capture log close
log 	using 20250822-brfss2015-2019-pathanalysis-tableoutput, replace text
version 15.1
clear 	all
macro 	drop _all
set 	linesize 120
set 	scheme plottig
set		more off
set		varabbrev off
set 	rmsg on

// #0. Document this do-file
	local today : di %tdCY/N/D daily("$S_DATE", "DMY")
	tokenize `today',parse("/")
	local year `1'
	local month `3'
	local day `5'

	local who "Ben Cheung"
	local pgm "20250822-brfss2015-2019-pathanalysis-tableoutput"
	local date "`year'-`month'-`day'"
	local tag "`pgm'.do by `who' on `date'"
	display "The tag is: `tag'"


	local today : di %tdCYND daily("$S_DATE", "DMY")


	*Check for installed packages
	capture which scheme-plottig.scheme
	if _rc!=0 ssc install blidschemes

	capture which confirmdir
	if _rc!=0 ssc install confirmdir

	capture which estout
	if _rc!=0 ssc install estout

	capture which sum2docx
	if _rc!=0 ssc install sum2docx

	capture which tab2xl
	if _rc!=0 net install http://www.stata.com/users/kcrow/tab2xl, replace

	set scheme plottig


local folder "graph"
confirmdir "`folder'"
if `r(confirmdir)'==170 {
	mkdir "`folder'"
}


local folder "graph/brfss2015-2019-pathanalysis-tableoutput"
confirmdir "`folder'"
if `r(confirmdir)'==170 {
	mkdir "`folder'"
}


local folder "model"
confirmdir "`folder'"
if `r(confirmdir)'==170 {
	mkdir "`folder'"
}

local folder "model/brfss2015-2019-pathanalysis-tableoutput"
confirmdir "`folder'"
if `r(confirmdir)'==170 {
	mkdir "`folder'"
}

local folder "summary"
confirmdir "`folder'"
if `r(confirmdir)'==170 {
	mkdir "`folder'"
}




*Define custom program to show command in loop
program define pe
	version 15.1
	if `"`0'"' != "" {
		display("")
		display as input `". `0'"'
		`0'
		display("")
	}
end





// #1. Data management
use "Data Ready for Analysis/brfss2015-readyforlistwiseanalysis.dta",clear

append using "Data Ready for Analysis/brfss2017-readyforlistwiseanalysis.dta"

append using "Data Ready for Analysis/brfss2019-readyforlistwiseanalysis.dta"

destring year, replace

svyset [pweight=svyweight], strata(strata) psu(psu) singleunit(centered)





// #2. Estimates output
**************************************Whether there are any differences in exercises between NHPI and other racial/ethnic groups Start****************************************************
local mname "exe_medb2"
eststo `mname': svy: gsem (exe_aerobic_advice_m1 exe_strength_advice_m1 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_m2 exe_strength_advice_m2 <- c.yearsold i.year i.educ ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_m3 exe_strength_advice_m3 <- c.yearsold i.year i.hhincome ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_m4 exe_strength_advice_m4 <- c.yearsold i.year i.educ i.hhincome ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f1 exe_strength_advice_f1 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f2 exe_strength_advice_f2 <- c.yearsold i.year i.educ ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f3 exe_strength_advice_f3 <- c.yearsold i.year i.hhincome ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f4 exe_strength_advice_f4 <- c.yearsold i.year i.educ i.hhincome ib2.praceethnicgp_multi_sim, ologit) ///
if yearsold>=25 & !mi(yearsold, educ, hhincome, praceethnicgp_multi_sim)






*Meeting aerobic exercise recommendation among men without mediators
lincom _b[exe_aerobic_advice_m1:0.praceethnicgp_multi_sim], eform
matrix aerobic_m1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m1_race0_se="(" + string(aerobic_m1_race0[2,1], "%3.2f") + ")"
local aerobic_m1_race0_p=aerobic_m1_race0[3,1]
if `aerobic_m1_race0_p'<0.001 {
	local aerobic_m1_race0_est=string(aerobic_m1_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m1_race0_p'<0.01 {
	local aerobic_m1_race0_est=string(aerobic_m1_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m1_race0_p'<0.05 {
	local aerobic_m1_race0_est=string(aerobic_m1_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m1_race0_est=string(aerobic_m1_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m1:1.praceethnicgp_multi_sim], eform
matrix aerobic_m1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m1_race1_se="(" + string(aerobic_m1_race1[2,1], "%3.2f") + ")"
local aerobic_m1_race1_p=aerobic_m1_race1[3,1]
if `aerobic_m1_race1_p'<0.001 {
	local aerobic_m1_race1_est=string(aerobic_m1_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m1_race1_p'<0.01 {
	local aerobic_m1_race1_est=string(aerobic_m1_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m1_race1_p'<0.05 {
	local aerobic_m1_race1_est=string(aerobic_m1_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m1_race1_est=string(aerobic_m1_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m1:3.praceethnicgp_multi_sim], eform
matrix aerobic_m1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m1_race3_se="(" + string(aerobic_m1_race3[2,1], "%3.2f") + ")"
local aerobic_m1_race3_p=aerobic_m1_race3[3,1]
if `aerobic_m1_race3_p'<0.001 {
	local aerobic_m1_race3_est=string(aerobic_m1_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m1_race3_p'<0.01 {
	local aerobic_m1_race3_est=string(aerobic_m1_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m1_race3_p'<0.05 {
	local aerobic_m1_race3_est=string(aerobic_m1_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m1_race3_est=string(aerobic_m1_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m1:4.praceethnicgp_multi_sim], eform
matrix aerobic_m1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m1_race4_se="(" + string(aerobic_m1_race4[2,1], "%3.2f") + ")"
local aerobic_m1_race4_p=aerobic_m1_race4[3,1]
if `aerobic_m1_race4_p'<0.001 {
	local aerobic_m1_race4_est=string(aerobic_m1_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m1_race4_p'<0.01 {
	local aerobic_m1_race4_est=string(aerobic_m1_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m1_race4_p'<0.05 {
	local aerobic_m1_race4_est=string(aerobic_m1_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m1_race4_est=string(aerobic_m1_race4[1,1], "%3.2f")
}



*Meeting aerobic exercise recommendation among men with education mediator
lincom _b[exe_aerobic_advice_m2:0.praceethnicgp_multi_sim], eform
matrix aerobic_m2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m2_race0_se="(" + string(aerobic_m2_race0[2,1], "%3.2f") + ")"
local aerobic_m2_race0_p=aerobic_m2_race0[3,1]
if `aerobic_m2_race0_p'<0.001 {
	local aerobic_m2_race0_est=string(aerobic_m2_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m2_race0_p'<0.01 {
	local aerobic_m2_race0_est=string(aerobic_m2_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m2_race0_p'<0.05 {
	local aerobic_m2_race0_est=string(aerobic_m2_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m2_race0_est=string(aerobic_m2_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m2:1.praceethnicgp_multi_sim], eform
matrix aerobic_m2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m2_race1_se="(" + string(aerobic_m2_race1[2,1], "%3.2f") + ")"
local aerobic_m2_race1_p=aerobic_m2_race1[3,1]
if `aerobic_m2_race1_p'<0.001 {
	local aerobic_m2_race1_est=string(aerobic_m2_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m2_race1_p'<0.01 {
	local aerobic_m2_race1_est=string(aerobic_m2_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m2_race1_p'<0.05 {
	local aerobic_m2_race1_est=string(aerobic_m2_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m2_race1_est=string(aerobic_m2_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m2:3.praceethnicgp_multi_sim], eform
matrix aerobic_m2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m2_race3_se="(" + string(aerobic_m2_race3[2,1], "%3.2f") + ")"
local aerobic_m2_race3_p=aerobic_m2_race3[3,1]
if `aerobic_m2_race3_p'<0.001 {
	local aerobic_m2_race3_est=string(aerobic_m2_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m2_race3_p'<0.01 {
	local aerobic_m2_race3_est=string(aerobic_m2_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m2_race3_p'<0.05 {
	local aerobic_m2_race3_est=string(aerobic_m2_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m2_race3_est=string(aerobic_m2_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m2:4.praceethnicgp_multi_sim], eform
matrix aerobic_m2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m2_race4_se="(" + string(aerobic_m2_race4[2,1], "%3.2f") + ")"
local aerobic_m2_race4_p=aerobic_m2_race4[3,1]
if `aerobic_m2_race4_p'<0.001 {
	local aerobic_m2_race4_est=string(aerobic_m2_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m2_race4_p'<0.01 {
	local aerobic_m2_race4_est=string(aerobic_m2_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m2_race4_p'<0.05 {
	local aerobic_m2_race4_est=string(aerobic_m2_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m2_race4_est=string(aerobic_m2_race4[1,1], "%3.2f")
}


*Test if education explains difference between NHPI and each racial/ethnic group
lincom _b[exe_aerobic_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m2:0.praceethnicgp_multi_sim], eform
local aerobic_m12_race0=`r(p)'

lincom _b[exe_aerobic_advice_m1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m2:1.praceethnicgp_multi_sim], eform
local aerobic_m12_race1=`r(p)'

lincom _b[exe_aerobic_advice_m1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m2:3.praceethnicgp_multi_sim], eform
local aerobic_m12_race3=`r(p)'

lincom _b[exe_aerobic_advice_m1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m2:4.praceethnicgp_multi_sim], eform
local aerobic_m12_race4=`r(p)'


*Meeting aerobic exercise recommendation among men with household income mediator
lincom _b[exe_aerobic_advice_m3:0.praceethnicgp_multi_sim], eform
matrix aerobic_m3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m3_race0_se="(" + string(aerobic_m3_race0[2,1], "%3.2f") + ")"
local aerobic_m3_race0_p=aerobic_m3_race0[3,1]
if `aerobic_m3_race0_p'<0.001 {
	local aerobic_m3_race0_est=string(aerobic_m3_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m3_race0_p'<0.01 {
	local aerobic_m3_race0_est=string(aerobic_m3_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m3_race0_p'<0.05 {
	local aerobic_m3_race0_est=string(aerobic_m3_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m3_race0_est=string(aerobic_m3_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m3:1.praceethnicgp_multi_sim], eform
matrix aerobic_m3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m3_race1_se="(" + string(aerobic_m3_race1[2,1], "%3.2f") + ")"
local aerobic_m3_race1_p=aerobic_m3_race1[3,1]
if `aerobic_m3_race1_p'<0.001 {
	local aerobic_m3_race1_est=string(aerobic_m3_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m3_race1_p'<0.01 {
	local aerobic_m3_race1_est=string(aerobic_m3_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m3_race1_p'<0.05 {
	local aerobic_m3_race1_est=string(aerobic_m3_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m3_race1_est=string(aerobic_m3_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m3:3.praceethnicgp_multi_sim], eform
matrix aerobic_m3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m3_race3_se="(" + string(aerobic_m3_race3[2,1], "%3.2f") + ")"
local aerobic_m3_race3_p=aerobic_m3_race3[3,1]
if `aerobic_m3_race3_p'<0.001 {
	local aerobic_m3_race3_est=string(aerobic_m3_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m3_race3_p'<0.01 {
	local aerobic_m3_race3_est=string(aerobic_m3_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m3_race3_p'<0.05 {
	local aerobic_m3_race3_est=string(aerobic_m3_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m3_race3_est=string(aerobic_m3_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m3:4.praceethnicgp_multi_sim], eform
matrix aerobic_m3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m3_race4_se="(" + string(aerobic_m3_race4[2,1], "%3.2f") + ")"
local aerobic_m3_race4_p=aerobic_m3_race4[3,1]
if `aerobic_m3_race4_p'<0.001 {
	local aerobic_m3_race4_est=string(aerobic_m3_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m3_race4_p'<0.01 {
	local aerobic_m3_race4_est=string(aerobic_m3_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m3_race4_p'<0.05 {
	local aerobic_m3_race4_est=string(aerobic_m3_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m3_race4_est=string(aerobic_m3_race4[1,1], "%3.2f")
}


*Test if household income explains difference between NHPI and each racial/ethnic group
lincom _b[exe_aerobic_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m3:0.praceethnicgp_multi_sim], eform
local aerobic_m13_race0=`r(p)'

lincom _b[exe_aerobic_advice_m1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m3:1.praceethnicgp_multi_sim], eform
local aerobic_m13_race1=`r(p)'

lincom _b[exe_aerobic_advice_m1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m3:3.praceethnicgp_multi_sim], eform
local aerobic_m13_race3=`r(p)'

lincom _b[exe_aerobic_advice_m1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m3:4.praceethnicgp_multi_sim], eform
local aerobic_m13_race4=`r(p)'


*Meeting aerobic exercise recommendation among men with two mediators
lincom _b[exe_aerobic_advice_m4:0.praceethnicgp_multi_sim], eform
matrix aerobic_m4_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m4_race0_se="(" + string(aerobic_m4_race0[2,1], "%3.2f") + ")"
local aerobic_m4_race0_p=aerobic_m4_race0[3,1]
if `aerobic_m4_race0_p'<0.001 {
	local aerobic_m4_race0_est=string(aerobic_m4_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m4_race0_p'<0.01 {
	local aerobic_m4_race0_est=string(aerobic_m4_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m4_race0_p'<0.05 {
	local aerobic_m4_race0_est=string(aerobic_m4_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m4_race0_est=string(aerobic_m4_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m4:1.praceethnicgp_multi_sim], eform
matrix aerobic_m4_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m4_race1_se="(" + string(aerobic_m4_race1[2,1], "%3.2f") + ")"
local aerobic_m4_race1_p=aerobic_m4_race1[3,1]
if `aerobic_m4_race1_p'<0.001 {
	local aerobic_m4_race1_est=string(aerobic_m4_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m4_race1_p'<0.01 {
	local aerobic_m4_race1_est=string(aerobic_m4_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m4_race1_p'<0.05 {
	local aerobic_m4_race1_est=string(aerobic_m4_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m4_race1_est=string(aerobic_m4_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m4:3.praceethnicgp_multi_sim], eform
matrix aerobic_m4_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m4_race3_se="(" + string(aerobic_m4_race3[2,1], "%3.2f") + ")"
local aerobic_m4_race3_p=aerobic_m4_race3[3,1]
if `aerobic_m4_race3_p'<0.001 {
	local aerobic_m4_race3_est=string(aerobic_m4_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m4_race3_p'<0.01 {
	local aerobic_m4_race3_est=string(aerobic_m4_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m4_race3_p'<0.05 {
	local aerobic_m4_race3_est=string(aerobic_m4_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m4_race3_est=string(aerobic_m4_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m4:4.praceethnicgp_multi_sim], eform
matrix aerobic_m4_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m4_race4_se="(" + string(aerobic_m4_race4[2,1], "%3.2f") + ")"
local aerobic_m4_race4_p=aerobic_m4_race4[3,1]
if `aerobic_m4_race4_p'<0.001 {
	local aerobic_m4_race4_est=string(aerobic_m4_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m4_race4_p'<0.01 {
	local aerobic_m4_race4_est=string(aerobic_m4_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m4_race4_p'<0.05 {
	local aerobic_m4_race4_est=string(aerobic_m4_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m4_race4_est=string(aerobic_m4_race4[1,1], "%3.2f")
}



*Test if two mediators explains difference between NHPI and each racial/ethnic group
lincom _b[exe_aerobic_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m4:0.praceethnicgp_multi_sim], eform
local aerobic_m14_race0=`r(p)'

lincom _b[exe_aerobic_advice_m1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m4:1.praceethnicgp_multi_sim], eform
local aerobic_m14_race1=`r(p)'

lincom _b[exe_aerobic_advice_m1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m4:3.praceethnicgp_multi_sim], eform
local aerobic_m14_race3=`r(p)'

lincom _b[exe_aerobic_advice_m1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m4:4.praceethnicgp_multi_sim], eform
local aerobic_m14_race4=`r(p)'


*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local aerobic_m1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m1")]
local aerobic_m2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m2")]
local aerobic_m3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m3")]
local aerobic_m4_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m4")]


/*
matrix Output=(aerobic_m1_race0, aerobic_m2_race0, aerobic_m12_race0, aerobic_m3_race0, aerobic_m13_race0, aerobic_m4_race0, aerobic_m14_race0 \ ///
aerobic_m1_race1, aerobic_m2_race1, aerobic_m12_race1, aerobic_m3_race1, aerobic_m13_race1, aerobic_m4_race1, aerobic_m14_race1 \ ///
aerobic_m1_race3, aerobic_m2_race3, aerobic_m12_race3, aerobic_m3_race3, aerobic_m13_race3, aerobic_m4_race3, aerobic_m14_race3 \ ///
aerobic_m1_race4, aerobic_m2_race4, aerobic_m12_race4, aerobic_m3_race4, aerobic_m13_race4, aerobic_m4_race4, aerobic_m14_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/aerobic_m", replace
putexcel A1=("") B1=("Estimates without mediators") C1=("Estimates with education mediator") D1=("Wald test with estimates without mediators (p-value)")
putexcel E1=("Estimates with household income mediator") F1=("Wald test with estimates without mediators (p-value)") G1=("Estimates with two mediators") H1=("Wald test with estimates without mediators (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`aerobic_m1_race0_est'" B3="`aerobic_m1_race0_se'" B4="`aerobic_m1_race1_est'" B5="`aerobic_m1_race1_se'"
putexcel B6="`aerobic_m1_race3_est'" B7="`aerobic_m1_race3_se'" B8="`aerobic_m1_race4_est'" B9="`aerobic_m1_race4_se'"
putexcel B10=`aerobic_m1_obs'
putexcel C2="`aerobic_m2_race0_est'" C3="`aerobic_m2_race0_se'" C4="`aerobic_m2_race1_est'" C5="`aerobic_m2_race1_se'"
putexcel C6="`aerobic_m2_race3_est'" C7="`aerobic_m2_race3_se'" C8="`aerobic_m2_race4_est'" C9="`aerobic_m2_race4_se'"
putexcel C10=`aerobic_m2_obs'
putexcel D2=`aerobic_m12_race0' D4=`aerobic_m12_race1' D6=`aerobic_m12_race3' D8=`aerobic_m12_race4', nformat(0.000)
putexcel E2="`aerobic_m3_race0_est'" E3="`aerobic_m3_race0_se'" E4="`aerobic_m3_race1_est'" E5="`aerobic_m3_race1_se'"
putexcel E6="`aerobic_m3_race3_est'" E7="`aerobic_m3_race3_se'" E8="`aerobic_m3_race4_est'" E9="`aerobic_m3_race4_se'"
putexcel E10=`aerobic_m3_obs'
putexcel F2=`aerobic_m13_race0' F4=`aerobic_m13_race1' F6=`aerobic_m13_race3' F8=`aerobic_m13_race4', nformat(0.000)
putexcel G2="`aerobic_m4_race0_est'" G3="`aerobic_m4_race0_se'" G4="`aerobic_m4_race1_est'" G5="`aerobic_m4_race1_se'"
putexcel G6="`aerobic_m4_race3_est'" G7="`aerobic_m4_race3_se'" G8="`aerobic_m4_race4_est'" G9="`aerobic_m4_race4_se'"
putexcel G10=`aerobic_m4_obs'
putexcel H2=`aerobic_m14_race0' H4=`aerobic_m14_race1' H6=`aerobic_m14_race3' H8=`aerobic_m14_race4', nformat(0.000)
putexcel close






*Meeting muscle strengthening recommendation among men without mediators
lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim], eform
matrix strength_m1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m1_race0_se="(" + string(strength_m1_race0[2,1], "%3.2f") + ")"
local strength_m1_race0_p=strength_m1_race0[3,1]
if `strength_m1_race0_p'<0.001 {
	local strength_m1_race0_est=string(strength_m1_race0[1,1], "%3.2f") + "***"
}
else if `strength_m1_race0_p'<0.01 {
	local strength_m1_race0_est=string(strength_m1_race0[1,1], "%3.2f") + "**"
}
else if `strength_m1_race0_p'<0.05 {
	local strength_m1_race0_est=string(strength_m1_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m1_race0_est=string(strength_m1_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m1:1.praceethnicgp_multi_sim], eform
matrix strength_m1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m1_race1_se="(" + string(strength_m1_race1[2,1], "%3.2f") + ")"
local strength_m1_race1_p=strength_m1_race1[3,1]
if `strength_m1_race1_p'<0.001 {
	local strength_m1_race1_est=string(strength_m1_race1[1,1], "%3.2f") + "***"
}
else if `strength_m1_race1_p'<0.01 {
	local strength_m1_race1_est=string(strength_m1_race1[1,1], "%3.2f") + "**"
}
else if `strength_m1_race1_p'<0.05 {
	local strength_m1_race1_est=string(strength_m1_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m1_race1_est=string(strength_m1_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m1:3.praceethnicgp_multi_sim], eform
matrix strength_m1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m1_race3_se="(" + string(strength_m1_race3[2,1], "%3.2f") + ")"
local strength_m1_race3_p=strength_m1_race3[3,1]
if `strength_m1_race3_p'<0.001 {
	local strength_m1_race3_est=string(strength_m1_race3[1,1], "%3.2f") + "***"
}
else if `strength_m1_race3_p'<0.01 {
	local strength_m1_race3_est=string(strength_m1_race3[1,1], "%3.2f") + "**"
}
else if `strength_m1_race3_p'<0.05 {
	local strength_m1_race3_est=string(strength_m1_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m1_race3_est=string(strength_m1_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m1:4.praceethnicgp_multi_sim], eform
matrix strength_m1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m1_race4_se="(" + string(strength_m1_race4[2,1], "%3.2f") + ")"
local strength_m1_race4_p=strength_m1_race4[3,1]
if `strength_m1_race4_p'<0.001 {
	local strength_m1_race4_est=string(strength_m1_race4[1,1], "%3.2f") + "***"
}
else if `strength_m1_race4_p'<0.01 {
	local strength_m1_race4_est=string(strength_m1_race4[1,1], "%3.2f") + "**"
}
else if `strength_m1_race4_p'<0.05 {
	local strength_m1_race4_est=string(strength_m1_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m1_race4_est=string(strength_m1_race4[1,1], "%3.2f")
}



*Meeting muscle strengthening recommendation among men with education mediator
lincom _b[exe_strength_advice_m2:0.praceethnicgp_multi_sim], eform
matrix strength_m2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m2_race0_se="(" + string(strength_m2_race0[2,1], "%3.2f") + ")"
local strength_m2_race0_p=strength_m2_race0[3,1]
if `strength_m2_race0_p'<0.001 {
	local strength_m2_race0_est=string(strength_m2_race0[1,1], "%3.2f") + "***"
}
else if `strength_m2_race0_p'<0.01 {
	local strength_m2_race0_est=string(strength_m2_race0[1,1], "%3.2f") + "**"
}
else if `strength_m2_race0_p'<0.05 {
	local strength_m2_race0_est=string(strength_m2_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m2_race0_est=string(strength_m2_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m2:1.praceethnicgp_multi_sim], eform
matrix strength_m2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m2_race1_se="(" + string(strength_m2_race1[2,1], "%3.2f") + ")"
local strength_m2_race1_p=strength_m2_race1[3,1]
if `strength_m2_race1_p'<0.001 {
	local strength_m2_race1_est=string(strength_m2_race1[1,1], "%3.2f") + "***"
}
else if `strength_m2_race1_p'<0.01 {
	local strength_m2_race1_est=string(strength_m2_race1[1,1], "%3.2f") + "**"
}
else if `strength_m2_race1_p'<0.05 {
	local strength_m2_race1_est=string(strength_m2_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m2_race1_est=string(strength_m2_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m2:3.praceethnicgp_multi_sim], eform
matrix strength_m2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m2_race3_se="(" + string(strength_m2_race3[2,1], "%3.2f") + ")"
local strength_m2_race3_p=strength_m2_race3[3,1]
if `strength_m2_race3_p'<0.001 {
	local strength_m2_race3_est=string(strength_m2_race3[1,1], "%3.2f") + "***"
}
else if `strength_m2_race3_p'<0.01 {
	local strength_m2_race3_est=string(strength_m2_race3[1,1], "%3.2f") + "**"
}
else if `strength_m2_race3_p'<0.05 {
	local strength_m2_race3_est=string(strength_m2_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m2_race3_est=string(strength_m2_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m2:4.praceethnicgp_multi_sim], eform
matrix strength_m2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m2_race4_se="(" + string(strength_m2_race4[2,1], "%3.2f") + ")"
local strength_m2_race4_p=strength_m2_race4[3,1]
if `strength_m2_race4_p'<0.001 {
	local strength_m2_race4_est=string(strength_m2_race4[1,1], "%3.2f") + "***"
}
else if `strength_m2_race4_p'<0.01 {
	local strength_m2_race4_est=string(strength_m2_race4[1,1], "%3.2f") + "**"
}
else if `strength_m2_race4_p'<0.05 {
	local strength_m2_race4_est=string(strength_m2_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m2_race4_est=string(strength_m2_race4[1,1], "%3.2f")
}


*Test if education explains difference between NHPI and each racial/ethnic group
lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m2:0.praceethnicgp_multi_sim], eform
local strength_m12_race0=`r(p)'

lincom _b[exe_strength_advice_m1:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_m2:1.praceethnicgp_multi_sim], eform
local strength_m12_race1=`r(p)'

lincom _b[exe_strength_advice_m1:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_m2:3.praceethnicgp_multi_sim], eform
local strength_m12_race3=`r(p)'

lincom _b[exe_strength_advice_m1:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_m2:4.praceethnicgp_multi_sim], eform
local strength_m12_race4=`r(p)'


*Meeting muscle strengthening recommendation among men with hosuehold income mediator
lincom _b[exe_strength_advice_m3:0.praceethnicgp_multi_sim], eform
matrix strength_m3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m3_race0_se="(" + string(strength_m3_race0[2,1], "%3.2f") + ")"
local strength_m3_race0_p=strength_m3_race0[3,1]
if `strength_m3_race0_p'<0.001 {
	local strength_m3_race0_est=string(strength_m3_race0[1,1], "%3.2f") + "***"
}
else if `strength_m3_race0_p'<0.01 {
	local strength_m3_race0_est=string(strength_m3_race0[1,1], "%3.2f") + "**"
}
else if `strength_m3_race0_p'<0.05 {
	local strength_m3_race0_est=string(strength_m3_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m3_race0_est=string(strength_m3_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m3:1.praceethnicgp_multi_sim], eform
matrix strength_m3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m3_race1_se="(" + string(strength_m3_race1[2,1], "%3.2f") + ")"
local strength_m3_race1_p=strength_m3_race1[3,1]
if `strength_m3_race1_p'<0.001 {
	local strength_m3_race1_est=string(strength_m3_race1[1,1], "%3.2f") + "***"
}
else if `strength_m3_race1_p'<0.01 {
	local strength_m3_race1_est=string(strength_m3_race1[1,1], "%3.2f") + "**"
}
else if `strength_m3_race1_p'<0.05 {
	local strength_m3_race1_est=string(strength_m3_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m3_race1_est=string(strength_m3_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m3:3.praceethnicgp_multi_sim], eform
matrix strength_m3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m3_race3_se="(" + string(strength_m3_race3[2,1], "%3.2f") + ")"
local strength_m3_race3_p=strength_m3_race3[3,1]
if `strength_m3_race3_p'<0.001 {
	local strength_m3_race3_est=string(strength_m3_race3[1,1], "%3.2f") + "***"
}
else if `strength_m3_race3_p'<0.01 {
	local strength_m3_race3_est=string(strength_m3_race3[1,1], "%3.2f") + "**"
}
else if `strength_m3_race3_p'<0.05 {
	local strength_m3_race3_est=string(strength_m3_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m3_race3_est=string(strength_m3_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m3:4.praceethnicgp_multi_sim], eform
matrix strength_m3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m3_race4_se="(" + string(strength_m3_race4[2,1], "%3.2f") + ")"
local strength_m3_race4_p=strength_m3_race4[3,1]
if `strength_m3_race4_p'<0.001 {
	local strength_m3_race4_est=string(strength_m3_race4[1,1], "%3.2f") + "***"
}
else if `strength_m3_race4_p'<0.01 {
	local strength_m3_race4_est=string(strength_m3_race4[1,1], "%3.2f") + "**"
}
else if `strength_m3_race4_p'<0.05 {
	local strength_m3_race4_est=string(strength_m3_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m3_race4_est=string(strength_m3_race4[1,1], "%3.2f")
}


*Test if education explains difference between NHPI and each racial/ethnic group
lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m3:0.praceethnicgp_multi_sim], eform
local strength_m13_race0=`r(p)'

lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m3:1.praceethnicgp_multi_sim], eform
local strength_m13_race1=`r(p)'

lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m3:3.praceethnicgp_multi_sim], eform
local strength_m13_race3=`r(p)'

lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m3:4.praceethnicgp_multi_sim], eform
local strength_m13_race4=`r(p)'


*Meeting muscle strengthening recommendation among men with two mediators
lincom _b[exe_strength_advice_m4:0.praceethnicgp_multi_sim], eform
matrix strength_m4_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m4_race0_se="(" + string(strength_m4_race0[2,1], "%3.2f") + ")"
local strength_m4_race0_p=strength_m4_race0[3,1]
if `strength_m4_race0_p'<0.001 {
	local strength_m4_race0_est=string(strength_m4_race0[1,1], "%3.2f") + "***"
}
else if `strength_m4_race0_p'<0.01 {
	local strength_m4_race0_est=string(strength_m4_race0[1,1], "%3.2f") + "**"
}
else if `strength_m4_race0_p'<0.05 {
	local strength_m4_race0_est=string(strength_m4_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m4_race0_est=string(strength_m4_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m4:1.praceethnicgp_multi_sim], eform
matrix strength_m4_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m4_race1_se="(" + string(strength_m4_race1[2,1], "%3.2f") + ")"
local strength_m4_race1_p=strength_m4_race1[3,1]
if `strength_m4_race1_p'<0.001 {
	local strength_m4_race1_est=string(strength_m4_race1[1,1], "%3.2f") + "***"
}
else if `strength_m4_race1_p'<0.01 {
	local strength_m4_race1_est=string(strength_m4_race1[1,1], "%3.2f") + "**"
}
else if `strength_m4_race1_p'<0.05 {
	local strength_m4_race1_est=string(strength_m4_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m4_race1_est=string(strength_m4_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m4:3.praceethnicgp_multi_sim], eform
matrix strength_m4_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m4_race3_se="(" + string(strength_m4_race3[2,1], "%3.2f") + ")"
local strength_m4_race3_p=strength_m4_race3[3,1]
if `strength_m4_race3_p'<0.001 {
	local strength_m4_race3_est=string(strength_m4_race3[1,1], "%3.2f") + "***"
}
else if `strength_m4_race3_p'<0.01 {
	local strength_m4_race3_est=string(strength_m4_race3[1,1], "%3.2f") + "**"
}
else if `strength_m4_race3_p'<0.05 {
	local strength_m4_race3_est=string(strength_m4_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m4_race3_est=string(strength_m4_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m4:4.praceethnicgp_multi_sim], eform
matrix strength_m4_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m4_race4_se="(" + string(strength_m4_race4[2,1], "%3.2f") + ")"
local strength_m4_race4_p=strength_m4_race4[3,1]
if `strength_m4_race4_p'<0.001 {
	local strength_m4_race4_est=string(strength_m4_race4[1,1], "%3.2f") + "***"
}
else if `strength_m4_race4_p'<0.01 {
	local strength_m4_race4_est=string(strength_m4_race4[1,1], "%3.2f") + "**"
}
else if `strength_m4_race4_p'<0.05 {
	local strength_m4_race4_est=string(strength_m4_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m4_race4_est=string(strength_m4_race4[1,1], "%3.2f")
}


*Test if two mediators explains difference between NHPI and each racial/ethnic group
lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m4:0.praceethnicgp_multi_sim], eform
local strength_m14_race0=`r(p)'

lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m4:1.praceethnicgp_multi_sim], eform
local strength_m14_race1=`r(p)'

lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m4:3.praceethnicgp_multi_sim], eform
local strength_m14_race3=`r(p)'

lincom _b[exe_strength_advice_m1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m4:4.praceethnicgp_multi_sim], eform
local strength_m14_race4=`r(p)'


*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local strength_m1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m1")]
local strength_m2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m2")]
local strength_m3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m3")]
local strength_m4_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m4")]



/*
matrix Output=(strength_m1_race0, strength_m2_race0, strength_m12_race0, strength_m3_race0, strength_m13_race0, strength_m4_race0, strength_m14_race0 \ ///
strength_m1_race1, strength_m2_race1, strength_m12_race1, strength_m3_race1, strength_m13_race1, strength_m4_race1, strength_m14_race1 \ ///
strength_m1_race3, strength_m2_race3, strength_m12_race3, strength_m3_race3, strength_m13_race3, strength_m4_race3, strength_m14_race3 \ ///
strength_m1_race4, strength_m2_race4, strength_m12_race4, strength_m3_race4, strength_m13_race4, strength_m4_race4, strength_m14_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/strength_m", replace
putexcel A1=("") B1=("Estimates without mediators") C1=("Estimates with education mediator") D1=("Wald test with estimates without mediators (p-value)")
putexcel E1=("Estimates with household income mediator") F1=("Wald test with estimates without mediators (p-value)") G1=("Estimates with two mediators") H1=("Wald test with estimates without mediators (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`strength_m1_race0_est'" B3="`strength_m1_race0_se'" B4="`strength_m1_race1_est'" B5="`strength_m1_race1_se'"
putexcel B6="`strength_m1_race3_est'" B7="`strength_m1_race3_se'" B8="`strength_m1_race4_est'" B9="`strength_m1_race4_se'"
putexcel B10=`strength_m1_obs'
putexcel C2="`strength_m2_race0_est'" C3="`strength_m2_race0_se'" C4="`strength_m2_race1_est'" C5="`strength_m2_race1_se'"
putexcel C6="`strength_m2_race3_est'" C7="`strength_m2_race3_se'" C8="`strength_m2_race4_est'" C9="`strength_m2_race4_se'"
putexcel C10=`strength_m2_obs'
putexcel D2=`strength_m12_race0' D4=`strength_m12_race1' D6=`strength_m12_race3' D8=`strength_m12_race4', nformat(0.000)
putexcel E2="`strength_m3_race0_est'" E3="`strength_m3_race0_se'" E4="`strength_m3_race1_est'" E5="`strength_m3_race1_se'"
putexcel E6="`strength_m3_race3_est'" E7="`strength_m3_race3_se'" E8="`strength_m3_race4_est'" E9="`strength_m3_race4_se'"
putexcel E10=`strength_m3_obs'
putexcel F2=`strength_m13_race0' F4=`strength_m13_race1' F6=`strength_m13_race3' F8=`strength_m13_race4', nformat(0.000)
putexcel G2="`strength_m4_race0_est'" G3="`strength_m4_race0_se'" G4="`strength_m4_race1_est'" G5="`strength_m4_race1_se'"
putexcel G6="`strength_m4_race3_est'" G7="`strength_m4_race3_se'" G8="`strength_m4_race4_est'" G9="`strength_m4_race4_se'"
putexcel G10=`strength_m4_obs'
putexcel H2=`strength_m14_race0' H4=`strength_m14_race1' H6=`strength_m14_race3' H8=`strength_m14_race4', nformat(0.000)
putexcel close










*Meeting aerobic exercise recomwomendation among women without mediators
lincom _b[exe_aerobic_advice_f1:0.praceethnicgp_multi_sim], eform
matrix aerobic_f1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f1_race0_se="(" + string(aerobic_f1_race0[2,1], "%3.2f") + ")"
local aerobic_f1_race0_p=aerobic_f1_race0[3,1]
if `aerobic_f1_race0_p'<0.001 {
	local aerobic_f1_race0_est=string(aerobic_f1_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f1_race0_p'<0.01 {
	local aerobic_f1_race0_est=string(aerobic_f1_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f1_race0_p'<0.05 {
	local aerobic_f1_race0_est=string(aerobic_f1_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f1_race0_est=string(aerobic_f1_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f1:1.praceethnicgp_multi_sim], eform
matrix aerobic_f1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f1_race1_se="(" + string(aerobic_f1_race1[2,1], "%3.2f") + ")"
local aerobic_f1_race1_p=aerobic_f1_race1[3,1]
if `aerobic_f1_race1_p'<0.001 {
	local aerobic_f1_race1_est=string(aerobic_f1_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f1_race1_p'<0.01 {
	local aerobic_f1_race1_est=string(aerobic_f1_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f1_race1_p'<0.05 {
	local aerobic_f1_race1_est=string(aerobic_f1_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f1_race1_est=string(aerobic_f1_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f1:3.praceethnicgp_multi_sim], eform
matrix aerobic_f1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f1_race3_se="(" + string(aerobic_f1_race3[2,1], "%3.2f") + ")"
local aerobic_f1_race3_p=aerobic_f1_race3[3,1]
if `aerobic_f1_race3_p'<0.001 {
	local aerobic_f1_race3_est=string(aerobic_f1_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f1_race3_p'<0.01 {
	local aerobic_f1_race3_est=string(aerobic_f1_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f1_race3_p'<0.05 {
	local aerobic_f1_race3_est=string(aerobic_f1_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f1_race3_est=string(aerobic_f1_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f1:4.praceethnicgp_multi_sim], eform
matrix aerobic_f1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f1_race4_se="(" + string(aerobic_f1_race4[2,1], "%3.2f") + ")"
local aerobic_f1_race4_p=aerobic_f1_race4[3,1]
if `aerobic_f1_race4_p'<0.001 {
	local aerobic_f1_race4_est=string(aerobic_f1_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f1_race4_p'<0.01 {
	local aerobic_f1_race4_est=string(aerobic_f1_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f1_race4_p'<0.05 {
	local aerobic_f1_race4_est=string(aerobic_f1_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f1_race4_est=string(aerobic_f1_race4[1,1], "%3.2f")
}



*Meeting aerobic exercise recomwomendation among women with education mediator
lincom _b[exe_aerobic_advice_f2:0.praceethnicgp_multi_sim], eform
matrix aerobic_f2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f2_race0_se="(" + string(aerobic_f2_race0[2,1], "%3.2f") + ")"
local aerobic_f2_race0_p=aerobic_f2_race0[3,1]
if `aerobic_f2_race0_p'<0.001 {
	local aerobic_f2_race0_est=string(aerobic_f2_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f2_race0_p'<0.01 {
	local aerobic_f2_race0_est=string(aerobic_f2_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f2_race0_p'<0.05 {
	local aerobic_f2_race0_est=string(aerobic_f2_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f2_race0_est=string(aerobic_f2_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f2:1.praceethnicgp_multi_sim], eform
matrix aerobic_f2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f2_race1_se="(" + string(aerobic_f2_race1[2,1], "%3.2f") + ")"
local aerobic_f2_race1_p=aerobic_f2_race1[3,1]
if `aerobic_f2_race1_p'<0.001 {
	local aerobic_f2_race1_est=string(aerobic_f2_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f2_race1_p'<0.01 {
	local aerobic_f2_race1_est=string(aerobic_f2_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f2_race1_p'<0.05 {
	local aerobic_f2_race1_est=string(aerobic_f2_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f2_race1_est=string(aerobic_f2_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f2:3.praceethnicgp_multi_sim], eform
matrix aerobic_f2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f2_race3_se="(" + string(aerobic_f2_race3[2,1], "%3.2f") + ")"
local aerobic_f2_race3_p=aerobic_f2_race3[3,1]
if `aerobic_f2_race3_p'<0.001 {
	local aerobic_f2_race3_est=string(aerobic_f2_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f2_race3_p'<0.01 {
	local aerobic_f2_race3_est=string(aerobic_f2_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f2_race3_p'<0.05 {
	local aerobic_f2_race3_est=string(aerobic_f2_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f2_race3_est=string(aerobic_f2_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f2:4.praceethnicgp_multi_sim], eform
matrix aerobic_f2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f2_race4_se="(" + string(aerobic_f2_race4[2,1], "%3.2f") + ")"
local aerobic_f2_race4_p=aerobic_f2_race4[3,1]
if `aerobic_f2_race4_p'<0.001 {
	local aerobic_f2_race4_est=string(aerobic_f2_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f2_race4_p'<0.01 {
	local aerobic_f2_race4_est=string(aerobic_f2_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f2_race4_p'<0.05 {
	local aerobic_f2_race4_est=string(aerobic_f2_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f2_race4_est=string(aerobic_f2_race4[1,1], "%3.2f")
}


*Test if education explains difference between NHPI and each racial/ethnic group
lincom _b[exe_aerobic_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f2:0.praceethnicgp_multi_sim], eform
local aerobic_f12_race0=`r(p)'

lincom _b[exe_aerobic_advice_f1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f2:1.praceethnicgp_multi_sim], eform
local aerobic_f12_race1=`r(p)'

lincom _b[exe_aerobic_advice_f1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f2:3.praceethnicgp_multi_sim], eform
local aerobic_f12_race3=`r(p)'

lincom _b[exe_aerobic_advice_f1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f2:4.praceethnicgp_multi_sim], eform
local aerobic_f12_race4=`r(p)'


*Meeting aerobic exercise recomwomendation among women with household income mediator
lincom _b[exe_aerobic_advice_f3:0.praceethnicgp_multi_sim], eform
matrix aerobic_f3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f3_race0_se="(" + string(aerobic_f3_race0[2,1], "%3.2f") + ")"
local aerobic_f3_race0_p=aerobic_f3_race0[3,1]
if `aerobic_f3_race0_p'<0.001 {
	local aerobic_f3_race0_est=string(aerobic_f3_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f3_race0_p'<0.01 {
	local aerobic_f3_race0_est=string(aerobic_f3_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f3_race0_p'<0.05 {
	local aerobic_f3_race0_est=string(aerobic_f3_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f3_race0_est=string(aerobic_f3_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f3:1.praceethnicgp_multi_sim], eform
matrix aerobic_f3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f3_race1_se="(" + string(aerobic_f3_race1[2,1], "%3.2f") + ")"
local aerobic_f3_race1_p=aerobic_f3_race1[3,1]
if `aerobic_f3_race1_p'<0.001 {
	local aerobic_f3_race1_est=string(aerobic_f3_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f3_race1_p'<0.01 {
	local aerobic_f3_race1_est=string(aerobic_f3_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f3_race1_p'<0.05 {
	local aerobic_f3_race1_est=string(aerobic_f3_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f3_race1_est=string(aerobic_f3_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f3:3.praceethnicgp_multi_sim], eform
matrix aerobic_f3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f3_race3_se="(" + string(aerobic_f3_race3[2,1], "%3.2f") + ")"
local aerobic_f3_race3_p=aerobic_f3_race3[3,1]
if `aerobic_f3_race3_p'<0.001 {
	local aerobic_f3_race3_est=string(aerobic_f3_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f3_race3_p'<0.01 {
	local aerobic_f3_race3_est=string(aerobic_f3_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f3_race3_p'<0.05 {
	local aerobic_f3_race3_est=string(aerobic_f3_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f3_race3_est=string(aerobic_f3_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f3:4.praceethnicgp_multi_sim], eform
matrix aerobic_f3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f3_race4_se="(" + string(aerobic_f3_race4[2,1], "%3.2f") + ")"
local aerobic_f3_race4_p=aerobic_f3_race4[3,1]
if `aerobic_f3_race4_p'<0.001 {
	local aerobic_f3_race4_est=string(aerobic_f3_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f3_race4_p'<0.01 {
	local aerobic_f3_race4_est=string(aerobic_f3_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f3_race4_p'<0.05 {
	local aerobic_f3_race4_est=string(aerobic_f3_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f3_race4_est=string(aerobic_f3_race4[1,1], "%3.2f")
}


*Test if household income explains difference between NHPI and each racial/ethnic group
lincom _b[exe_aerobic_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f3:0.praceethnicgp_multi_sim], eform
local aerobic_f13_race0=`r(p)'

lincom _b[exe_aerobic_advice_f1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f3:1.praceethnicgp_multi_sim], eform
local aerobic_f13_race1=`r(p)'

lincom _b[exe_aerobic_advice_f1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f3:3.praceethnicgp_multi_sim], eform
local aerobic_f13_race3=`r(p)'

lincom _b[exe_aerobic_advice_f1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f3:4.praceethnicgp_multi_sim], eform
local aerobic_f13_race4=`r(p)'


*Meeting aerobic exercise recomwomendation among women with two mediators
lincom _b[exe_aerobic_advice_f4:0.praceethnicgp_multi_sim], eform
matrix aerobic_f4_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f4_race0_se="(" + string(aerobic_f4_race0[2,1], "%3.2f") + ")"
local aerobic_f4_race0_p=aerobic_f4_race0[3,1]
if `aerobic_f4_race0_p'<0.001 {
	local aerobic_f4_race0_est=string(aerobic_f4_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f4_race0_p'<0.01 {
	local aerobic_f4_race0_est=string(aerobic_f4_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f4_race0_p'<0.05 {
	local aerobic_f4_race0_est=string(aerobic_f4_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f4_race0_est=string(aerobic_f4_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f4:1.praceethnicgp_multi_sim], eform
matrix aerobic_f4_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f4_race1_se="(" + string(aerobic_f4_race1[2,1], "%3.2f") + ")"
local aerobic_f4_race1_p=aerobic_f4_race1[3,1]
if `aerobic_f4_race1_p'<0.001 {
	local aerobic_f4_race1_est=string(aerobic_f4_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f4_race1_p'<0.01 {
	local aerobic_f4_race1_est=string(aerobic_f4_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f4_race1_p'<0.05 {
	local aerobic_f4_race1_est=string(aerobic_f4_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f4_race1_est=string(aerobic_f4_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f4:3.praceethnicgp_multi_sim], eform
matrix aerobic_f4_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f4_race3_se="(" + string(aerobic_f4_race3[2,1], "%3.2f") + ")"
local aerobic_f4_race3_p=aerobic_f4_race3[3,1]
if `aerobic_f4_race3_p'<0.001 {
	local aerobic_f4_race3_est=string(aerobic_f4_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f4_race3_p'<0.01 {
	local aerobic_f4_race3_est=string(aerobic_f4_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f4_race3_p'<0.05 {
	local aerobic_f4_race3_est=string(aerobic_f4_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f4_race3_est=string(aerobic_f4_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f4:4.praceethnicgp_multi_sim], eform
matrix aerobic_f4_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f4_race4_se="(" + string(aerobic_f4_race4[2,1], "%3.2f") + ")"
local aerobic_f4_race4_p=aerobic_f4_race4[3,1]
if `aerobic_f4_race4_p'<0.001 {
	local aerobic_f4_race4_est=string(aerobic_f4_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f4_race4_p'<0.01 {
	local aerobic_f4_race4_est=string(aerobic_f4_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f4_race4_p'<0.05 {
	local aerobic_f4_race4_est=string(aerobic_f4_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f4_race4_est=string(aerobic_f4_race4[1,1], "%3.2f")
}



*Test if two mediators explains difference between NHPI and each racial/ethnic group
lincom _b[exe_aerobic_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f4:0.praceethnicgp_multi_sim], eform
local aerobic_f14_race0=`r(p)'

lincom _b[exe_aerobic_advice_f1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f4:1.praceethnicgp_multi_sim], eform
local aerobic_f14_race1=`r(p)'

lincom _b[exe_aerobic_advice_f1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f4:3.praceethnicgp_multi_sim], eform
local aerobic_f14_race3=`r(p)'

lincom _b[exe_aerobic_advice_f1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f4:4.praceethnicgp_multi_sim], eform
local aerobic_f14_race4=`r(p)'


*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local aerobic_f1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f1")]
local aerobic_f2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f2")]
local aerobic_f3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f3")]
local aerobic_f4_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f4")]


/*
matrix Output=(aerobic_f1_race0, aerobic_f2_race0, aerobic_f12_race0, aerobic_f3_race0, aerobic_f13_race0, aerobic_f4_race0, aerobic_f14_race0 \ ///
aerobic_f1_race1, aerobic_f2_race1, aerobic_f12_race1, aerobic_f3_race1, aerobic_f13_race1, aerobic_f4_race1, aerobic_f14_race1 \ ///
aerobic_f1_race3, aerobic_f2_race3, aerobic_f12_race3, aerobic_f3_race3, aerobic_f13_race3, aerobic_f4_race3, aerobic_f14_race3 \ ///
aerobic_f1_race4, aerobic_f2_race4, aerobic_f12_race4, aerobic_f3_race4, aerobic_f13_race4, aerobic_f4_race4, aerobic_f14_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/aerobic_f", replace
putexcel A1=("") B1=("Estimates without mediators") C1=("Estimates with education mediator") D1=("Wald test with estimates without mediators (p-value)")
putexcel E1=("Estimates with household income mediator") F1=("Wald test with estimates without mediators (p-value)") G1=("Estimates with two mediators") H1=("Wald test with estimates without mediators (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`aerobic_f1_race0_est'" B3="`aerobic_f1_race0_se'" B4="`aerobic_f1_race1_est'" B5="`aerobic_f1_race1_se'"
putexcel B6="`aerobic_f1_race3_est'" B7="`aerobic_f1_race3_se'" B8="`aerobic_f1_race4_est'" B9="`aerobic_f1_race4_se'"
putexcel B10=`aerobic_f1_obs'
putexcel C2="`aerobic_f2_race0_est'" C3="`aerobic_f2_race0_se'" C4="`aerobic_f2_race1_est'" C5="`aerobic_f2_race1_se'"
putexcel C6="`aerobic_f2_race3_est'" C7="`aerobic_f2_race3_se'" C8="`aerobic_f2_race4_est'" C9="`aerobic_f2_race4_se'"
putexcel C10=`aerobic_f2_obs'
putexcel D2=`aerobic_f12_race0' D4=`aerobic_f12_race1' D6=`aerobic_f12_race3' D8=`aerobic_f12_race4', nformat(0.000)
putexcel E2="`aerobic_f3_race0_est'" E3="`aerobic_f3_race0_se'" E4="`aerobic_f3_race1_est'" E5="`aerobic_f3_race1_se'"
putexcel E6="`aerobic_f3_race3_est'" E7="`aerobic_f3_race3_se'" E8="`aerobic_f3_race4_est'" E9="`aerobic_f3_race4_se'"
putexcel E10=`aerobic_f3_obs'
putexcel F2=`aerobic_f13_race0' F4=`aerobic_f13_race1' F6=`aerobic_f13_race3' F8=`aerobic_f13_race4', nformat(0.000)
putexcel G2="`aerobic_f4_race0_est'" G3="`aerobic_f4_race0_se'" G4="`aerobic_f4_race1_est'" G5="`aerobic_f4_race1_se'"
putexcel G6="`aerobic_f4_race3_est'" G7="`aerobic_f4_race3_se'" G8="`aerobic_f4_race4_est'" G9="`aerobic_f4_race4_se'"
putexcel G10=`aerobic_f4_obs'
putexcel H2=`aerobic_f14_race0' H4=`aerobic_f14_race1' H6=`aerobic_f14_race3' H8=`aerobic_f14_race4', nformat(0.000)
putexcel close






*Meeting muscle strengthening recomwomendation among women without mediators
lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim], eform
matrix strength_f1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f1_race0_se="(" + string(strength_f1_race0[2,1], "%3.2f") + ")"
local strength_f1_race0_p=strength_f1_race0[3,1]
if `strength_f1_race0_p'<0.001 {
	local strength_f1_race0_est=string(strength_f1_race0[1,1], "%3.2f") + "***"
}
else if `strength_f1_race0_p'<0.01 {
	local strength_f1_race0_est=string(strength_f1_race0[1,1], "%3.2f") + "**"
}
else if `strength_f1_race0_p'<0.05 {
	local strength_f1_race0_est=string(strength_f1_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f1_race0_est=string(strength_f1_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f1:1.praceethnicgp_multi_sim], eform
matrix strength_f1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f1_race1_se="(" + string(strength_f1_race1[2,1], "%3.2f") + ")"
local strength_f1_race1_p=strength_f1_race1[3,1]
if `strength_f1_race1_p'<0.001 {
	local strength_f1_race1_est=string(strength_f1_race1[1,1], "%3.2f") + "***"
}
else if `strength_f1_race1_p'<0.01 {
	local strength_f1_race1_est=string(strength_f1_race1[1,1], "%3.2f") + "**"
}
else if `strength_f1_race1_p'<0.05 {
	local strength_f1_race1_est=string(strength_f1_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f1_race1_est=string(strength_f1_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f1:3.praceethnicgp_multi_sim], eform
matrix strength_f1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f1_race3_se="(" + string(strength_f1_race3[2,1], "%3.2f") + ")"
local strength_f1_race3_p=strength_f1_race3[3,1]
if `strength_f1_race3_p'<0.001 {
	local strength_f1_race3_est=string(strength_f1_race3[1,1], "%3.2f") + "***"
}
else if `strength_f1_race3_p'<0.01 {
	local strength_f1_race3_est=string(strength_f1_race3[1,1], "%3.2f") + "**"
}
else if `strength_f1_race3_p'<0.05 {
	local strength_f1_race3_est=string(strength_f1_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f1_race3_est=string(strength_f1_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f1:4.praceethnicgp_multi_sim], eform
matrix strength_f1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f1_race4_se="(" + string(strength_f1_race4[2,1], "%3.2f") + ")"
local strength_f1_race4_p=strength_f1_race4[3,1]
if `strength_f1_race4_p'<0.001 {
	local strength_f1_race4_est=string(strength_f1_race4[1,1], "%3.2f") + "***"
}
else if `strength_f1_race4_p'<0.01 {
	local strength_f1_race4_est=string(strength_f1_race4[1,1], "%3.2f") + "**"
}
else if `strength_f1_race4_p'<0.05 {
	local strength_f1_race4_est=string(strength_f1_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f1_race4_est=string(strength_f1_race4[1,1], "%3.2f")
}



*Meeting muscle strengthening recomwomendation among women with education mediator
lincom _b[exe_strength_advice_f2:0.praceethnicgp_multi_sim], eform
matrix strength_f2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f2_race0_se="(" + string(strength_f2_race0[2,1], "%3.2f") + ")"
local strength_f2_race0_p=strength_f2_race0[3,1]
if `strength_f2_race0_p'<0.001 {
	local strength_f2_race0_est=string(strength_f2_race0[1,1], "%3.2f") + "***"
}
else if `strength_f2_race0_p'<0.01 {
	local strength_f2_race0_est=string(strength_f2_race0[1,1], "%3.2f") + "**"
}
else if `strength_f2_race0_p'<0.05 {
	local strength_f2_race0_est=string(strength_f2_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f2_race0_est=string(strength_f2_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f2:1.praceethnicgp_multi_sim], eform
matrix strength_f2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f2_race1_se="(" + string(strength_f2_race1[2,1], "%3.2f") + ")"
local strength_f2_race1_p=strength_f2_race1[3,1]
if `strength_f2_race1_p'<0.001 {
	local strength_f2_race1_est=string(strength_f2_race1[1,1], "%3.2f") + "***"
}
else if `strength_f2_race1_p'<0.01 {
	local strength_f2_race1_est=string(strength_f2_race1[1,1], "%3.2f") + "**"
}
else if `strength_f2_race1_p'<0.05 {
	local strength_f2_race1_est=string(strength_f2_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f2_race1_est=string(strength_f2_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f2:3.praceethnicgp_multi_sim], eform
matrix strength_f2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f2_race3_se="(" + string(strength_f2_race3[2,1], "%3.2f") + ")"
local strength_f2_race3_p=strength_f2_race3[3,1]
if `strength_f2_race3_p'<0.001 {
	local strength_f2_race3_est=string(strength_f2_race3[1,1], "%3.2f") + "***"
}
else if `strength_f2_race3_p'<0.01 {
	local strength_f2_race3_est=string(strength_f2_race3[1,1], "%3.2f") + "**"
}
else if `strength_f2_race3_p'<0.05 {
	local strength_f2_race3_est=string(strength_f2_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f2_race3_est=string(strength_f2_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f2:4.praceethnicgp_multi_sim], eform
matrix strength_f2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f2_race4_se="(" + string(strength_f2_race4[2,1], "%3.2f") + ")"
local strength_f2_race4_p=strength_f2_race4[3,1]
if `strength_f2_race4_p'<0.001 {
	local strength_f2_race4_est=string(strength_f2_race4[1,1], "%3.2f") + "***"
}
else if `strength_f2_race4_p'<0.01 {
	local strength_f2_race4_est=string(strength_f2_race4[1,1], "%3.2f") + "**"
}
else if `strength_f2_race4_p'<0.05 {
	local strength_f2_race4_est=string(strength_f2_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f2_race4_est=string(strength_f2_race4[1,1], "%3.2f")
}


*Test if education explains difference between NHPI and each racial/ethnic group
lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f2:0.praceethnicgp_multi_sim], eform
local strength_f12_race0=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f2:1.praceethnicgp_multi_sim], eform
local strength_f12_race1=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f2:3.praceethnicgp_multi_sim], eform
local strength_f12_race3=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f2:4.praceethnicgp_multi_sim], eform
local strength_f12_race4=`r(p)'


*Meeting muscle strengthening recomwomendation among women with hosuehold income mediator
lincom _b[exe_strength_advice_f3:0.praceethnicgp_multi_sim], eform
matrix strength_f3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f3_race0_se="(" + string(strength_f3_race0[2,1], "%3.2f") + ")"
local strength_f3_race0_p=strength_f3_race0[3,1]
if `strength_f3_race0_p'<0.001 {
	local strength_f3_race0_est=string(strength_f3_race0[1,1], "%3.2f") + "***"
}
else if `strength_f3_race0_p'<0.01 {
	local strength_f3_race0_est=string(strength_f3_race0[1,1], "%3.2f") + "**"
}
else if `strength_f3_race0_p'<0.05 {
	local strength_f3_race0_est=string(strength_f3_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f3_race0_est=string(strength_f3_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f3:1.praceethnicgp_multi_sim], eform
matrix strength_f3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f3_race1_se="(" + string(strength_f3_race1[2,1], "%3.2f") + ")"
local strength_f3_race1_p=strength_f3_race1[3,1]
if `strength_f3_race1_p'<0.001 {
	local strength_f3_race1_est=string(strength_f3_race1[1,1], "%3.2f") + "***"
}
else if `strength_f3_race1_p'<0.01 {
	local strength_f3_race1_est=string(strength_f3_race1[1,1], "%3.2f") + "**"
}
else if `strength_f3_race1_p'<0.05 {
	local strength_f3_race1_est=string(strength_f3_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f3_race1_est=string(strength_f3_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f3:3.praceethnicgp_multi_sim], eform
matrix strength_f3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f3_race3_se="(" + string(strength_f3_race3[2,1], "%3.2f") + ")"
local strength_f3_race3_p=strength_f3_race3[3,1]
if `strength_f3_race3_p'<0.001 {
	local strength_f3_race3_est=string(strength_f3_race3[1,1], "%3.2f") + "***"
}
else if `strength_f3_race3_p'<0.01 {
	local strength_f3_race3_est=string(strength_f3_race3[1,1], "%3.2f") + "**"
}
else if `strength_f3_race3_p'<0.05 {
	local strength_f3_race3_est=string(strength_f3_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f3_race3_est=string(strength_f3_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f3:4.praceethnicgp_multi_sim], eform
matrix strength_f3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f3_race4_se="(" + string(strength_f3_race4[2,1], "%3.2f") + ")"
local strength_f3_race4_p=strength_f3_race4[3,1]
if `strength_f3_race4_p'<0.001 {
	local strength_f3_race4_est=string(strength_f3_race4[1,1], "%3.2f") + "***"
}
else if `strength_f3_race4_p'<0.01 {
	local strength_f3_race4_est=string(strength_f3_race4[1,1], "%3.2f") + "**"
}
else if `strength_f3_race4_p'<0.05 {
	local strength_f3_race4_est=string(strength_f3_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f3_race4_est=string(strength_f3_race4[1,1], "%3.2f")
}


*Test if education explains difference between NHPI and each racial/ethnic group
lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f3:0.praceethnicgp_multi_sim], eform
local strength_f13_race0=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f3:1.praceethnicgp_multi_sim], eform
local strength_f13_race1=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f3:3.praceethnicgp_multi_sim], eform
local strength_f13_race3=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f3:4.praceethnicgp_multi_sim], eform
local strength_f13_race4=`r(p)'


*Meeting muscle strengthening recomwomendation among women with two mediators
lincom _b[exe_strength_advice_f4:0.praceethnicgp_multi_sim], eform
matrix strength_f4_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f4_race0_se="(" + string(strength_f4_race0[2,1], "%3.2f") + ")"
local strength_f4_race0_p=strength_f4_race0[3,1]
if `strength_f4_race0_p'<0.001 {
	local strength_f4_race0_est=string(strength_f4_race0[1,1], "%3.2f") + "***"
}
else if `strength_f4_race0_p'<0.01 {
	local strength_f4_race0_est=string(strength_f4_race0[1,1], "%3.2f") + "**"
}
else if `strength_f4_race0_p'<0.05 {
	local strength_f4_race0_est=string(strength_f4_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f4_race0_est=string(strength_f4_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f4:1.praceethnicgp_multi_sim], eform
matrix strength_f4_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f4_race1_se="(" + string(strength_f4_race1[2,1], "%3.2f") + ")"
local strength_f4_race1_p=strength_f4_race1[3,1]
if `strength_f4_race1_p'<0.001 {
	local strength_f4_race1_est=string(strength_f4_race1[1,1], "%3.2f") + "***"
}
else if `strength_f4_race1_p'<0.01 {
	local strength_f4_race1_est=string(strength_f4_race1[1,1], "%3.2f") + "**"
}
else if `strength_f4_race1_p'<0.05 {
	local strength_f4_race1_est=string(strength_f4_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f4_race1_est=string(strength_f4_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f4:3.praceethnicgp_multi_sim], eform
matrix strength_f4_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f4_race3_se="(" + string(strength_f4_race3[2,1], "%3.2f") + ")"
local strength_f4_race3_p=strength_f4_race3[3,1]
if `strength_f4_race3_p'<0.001 {
	local strength_f4_race3_est=string(strength_f4_race3[1,1], "%3.2f") + "***"
}
else if `strength_f4_race3_p'<0.01 {
	local strength_f4_race3_est=string(strength_f4_race3[1,1], "%3.2f") + "**"
}
else if `strength_f4_race3_p'<0.05 {
	local strength_f4_race3_est=string(strength_f4_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f4_race3_est=string(strength_f4_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f4:4.praceethnicgp_multi_sim], eform
matrix strength_f4_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f4_race4_se="(" + string(strength_f4_race4[2,1], "%3.2f") + ")"
local strength_f4_race4_p=strength_f4_race4[3,1]
if `strength_f4_race4_p'<0.001 {
	local strength_f4_race4_est=string(strength_f4_race4[1,1], "%3.2f") + "***"
}
else if `strength_f4_race4_p'<0.01 {
	local strength_f4_race4_est=string(strength_f4_race4[1,1], "%3.2f") + "**"
}
else if `strength_f4_race4_p'<0.05 {
	local strength_f4_race4_est=string(strength_f4_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f4_race4_est=string(strength_f4_race4[1,1], "%3.2f")
}


*Test if two mediators explains difference between NHPI and each racial/ethnic group
lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f4:0.praceethnicgp_multi_sim], eform
local strength_f14_race0=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f4:1.praceethnicgp_multi_sim], eform
local strength_f14_race1=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f4:3.praceethnicgp_multi_sim], eform
local strength_f14_race3=`r(p)'

lincom _b[exe_strength_advice_f1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f4:4.praceethnicgp_multi_sim], eform
local strength_f14_race4=`r(p)'


*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local strength_f1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f1")]
local strength_f2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f2")]
local strength_f3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f3")]
local strength_f4_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f4")]



/*
matrix Output=(strength_f1_race0, strength_f2_race0, strength_f12_race0, strength_f3_race0, strength_f13_race0, strength_f4_race0, strength_f14_race0 \ ///
strength_f1_race1, strength_f2_race1, strength_f12_race1, strength_f3_race1, strength_f13_race1, strength_f4_race1, strength_f14_race1 \ ///
strength_f1_race3, strength_f2_race3, strength_f12_race3, strength_f3_race3, strength_f13_race3, strength_f4_race3, strength_f14_race3 \ ///
strength_f1_race4, strength_f2_race4, strength_f12_race4, strength_f3_race4, strength_f13_race4, strength_f4_race4, strength_f14_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/strength_f", replace
putexcel A1=("") B1=("Estimates without mediators") C1=("Estimates with education mediator") D1=("Wald test with estimates without mediators (p-value)")
putexcel E1=("Estimates with household income mediator") F1=("Wald test with estimates without mediators (p-value)") G1=("Estimates with two mediators") H1=("Wald test with estimates without mediators (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`strength_f1_race0_est'" B3="`strength_f1_race0_se'" B4="`strength_f1_race1_est'" B5="`strength_f1_race1_se'"
putexcel B6="`strength_f1_race3_est'" B7="`strength_f1_race3_se'" B8="`strength_f1_race4_est'" B9="`strength_f1_race4_se'"
putexcel B10=`strength_f1_obs'
putexcel C2="`strength_f2_race0_est'" C3="`strength_f2_race0_se'" C4="`strength_f2_race1_est'" C5="`strength_f2_race1_se'"
putexcel C6="`strength_f2_race3_est'" C7="`strength_f2_race3_se'" C8="`strength_f2_race4_est'" C9="`strength_f2_race4_se'"
putexcel C10=`strength_f2_obs'
putexcel D2=`strength_f12_race0' D4=`strength_f12_race1' D6=`strength_f12_race3' D8=`strength_f12_race4', nformat(0.000)
putexcel E2="`strength_f3_race0_est'" E3="`strength_f3_race0_se'" E4="`strength_f3_race1_est'" E5="`strength_f3_race1_se'"
putexcel E6="`strength_f3_race3_est'" E7="`strength_f3_race3_se'" E8="`strength_f3_race4_est'" E9="`strength_f3_race4_se'"
putexcel E10=`strength_f3_obs'
putexcel F2=`strength_f13_race0' F4=`strength_f13_race1' F6=`strength_f13_race3' F8=`strength_f13_race4', nformat(0.000)
putexcel G2="`strength_f4_race0_est'" G3="`strength_f4_race0_se'" G4="`strength_f4_race1_est'" G5="`strength_f4_race1_se'"
putexcel G6="`strength_f4_race3_est'" G7="`strength_f4_race3_se'" G8="`strength_f4_race4_est'" G9="`strength_f4_race4_se'"
putexcel G10=`strength_f4_obs'
putexcel H2=`strength_f14_race0' H4=`strength_f14_race1' H6=`strength_f14_race3' H8=`strength_f14_race4', nformat(0.000)
putexcel close
**************************************Whether there are any differences in exercises between NHPI and other racial/ethnic groups End****************************************************












**************************************Whether differences in exercises between NHPI and other racial/ethnic groups vary between census regions Start****************************************************
local mname "exe_med_cr_simb2"
eststo `mname': svy: gsem (exe_aerobic_advice_m_cr0 exe_strength_advice_m_cr0 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_m_cr1 exe_strength_advice_m_cr1 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_m_cr2 exe_strength_advice_m_cr2 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_m_cr3 exe_strength_advice_m_cr3 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f_cr0 exe_strength_advice_f_cr0 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f_cr1 exe_strength_advice_f_cr1 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f_cr2 exe_strength_advice_f_cr2 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
(exe_aerobic_advice_f_cr3 exe_strength_advice_f_cr3 <- c.yearsold i.year ib2.praceethnicgp_multi_sim, ologit) ///
if yearsold>=25 & !mi(yearsold, educ, hhincome, praceethnicgp_multi_sim)







*Meeting aerobic exercise recommendation among men in Eastern US
lincom _b[exe_aerobic_advice_m_cr0:0.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr0_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr0_race0_se="(" + string(aerobic_m_cr0_race0[2,1], "%3.2f") + ")"
local aerobic_m_cr0_race0_p=aerobic_m_cr0_race0[3,1]
if `aerobic_m_cr0_race0_p'<0.001 {
	local aerobic_m_cr0_race0_est=string(aerobic_m_cr0_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr0_race0_p'<0.01 {
	local aerobic_m_cr0_race0_est=string(aerobic_m_cr0_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr0_race0_p'<0.05 {
	local aerobic_m_cr0_race0_est=string(aerobic_m_cr0_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr0_race0_est=string(aerobic_m_cr0_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr0:1.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr0_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr0_race1_se="(" + string(aerobic_m_cr0_race1[2,1], "%3.2f") + ")"
local aerobic_m_cr0_race1_p=aerobic_m_cr0_race1[3,1]
if `aerobic_m_cr0_race1_p'<0.001 {
	local aerobic_m_cr0_race1_est=string(aerobic_m_cr0_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr0_race1_p'<0.01 {
	local aerobic_m_cr0_race1_est=string(aerobic_m_cr0_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr0_race1_p'<0.05 {
	local aerobic_m_cr0_race1_est=string(aerobic_m_cr0_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr0_race1_est=string(aerobic_m_cr0_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr0:3.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr0_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr0_race3_se="(" + string(aerobic_m_cr0_race3[2,1], "%3.2f") + ")"
local aerobic_m_cr0_race3_p=aerobic_m_cr0_race3[3,1]
if `aerobic_m_cr0_race3_p'<0.001 {
	local aerobic_m_cr0_race3_est=string(aerobic_m_cr0_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr0_race3_p'<0.01 {
	local aerobic_m_cr0_race3_est=string(aerobic_m_cr0_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr0_race3_p'<0.05 {
	local aerobic_m_cr0_race3_est=string(aerobic_m_cr0_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr0_race3_est=string(aerobic_m_cr0_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr0:4.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr0_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr0_race4_se="(" + string(aerobic_m_cr0_race4[2,1], "%3.2f") + ")"
local aerobic_m_cr0_race4_p=aerobic_m_cr0_race4[3,1]
if `aerobic_m_cr0_race4_p'<0.001 {
	local aerobic_m_cr0_race4_est=string(aerobic_m_cr0_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr0_race4_p'<0.01 {
	local aerobic_m_cr0_race4_est=string(aerobic_m_cr0_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr0_race4_p'<0.05 {
	local aerobic_m_cr0_race4_est=string(aerobic_m_cr0_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr0_race4_est=string(aerobic_m_cr0_race4[1,1], "%3.2f")
}





*Meeting aerobic exercise recommendation among men in Western US
lincom _b[exe_aerobic_advice_m_cr1:0.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr1_race0_se="(" + string(aerobic_m_cr1_race0[2,1], "%3.2f") + ")"
local aerobic_m_cr1_race0_p=aerobic_m_cr1_race0[3,1]
if `aerobic_m_cr1_race0_p'<0.001 {
	local aerobic_m_cr1_race0_est=string(aerobic_m_cr1_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr1_race0_p'<0.01 {
	local aerobic_m_cr1_race0_est=string(aerobic_m_cr1_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr1_race0_p'<0.05 {
	local aerobic_m_cr1_race0_est=string(aerobic_m_cr1_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr1_race0_est=string(aerobic_m_cr1_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr1:1.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr1_race1_se="(" + string(aerobic_m_cr1_race1[2,1], "%3.2f") + ")"
local aerobic_m_cr1_race1_p=aerobic_m_cr1_race1[3,1]
if `aerobic_m_cr1_race1_p'<0.001 {
	local aerobic_m_cr1_race1_est=string(aerobic_m_cr1_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr1_race1_p'<0.01 {
	local aerobic_m_cr1_race1_est=string(aerobic_m_cr1_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr1_race1_p'<0.05 {
	local aerobic_m_cr1_race1_est=string(aerobic_m_cr1_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr1_race1_est=string(aerobic_m_cr1_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr1:3.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr1_race3_se="(" + string(aerobic_m_cr1_race3[2,1], "%3.2f") + ")"
local aerobic_m_cr1_race3_p=aerobic_m_cr1_race3[3,1]
if `aerobic_m_cr1_race3_p'<0.001 {
	local aerobic_m_cr1_race3_est=string(aerobic_m_cr1_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr1_race3_p'<0.01 {
	local aerobic_m_cr1_race3_est=string(aerobic_m_cr1_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr1_race3_p'<0.05 {
	local aerobic_m_cr1_race3_est=string(aerobic_m_cr1_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr1_race3_est=string(aerobic_m_cr1_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr1:4.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr1_race4_se="(" + string(aerobic_m_cr1_race4[2,1], "%3.2f") + ")"
local aerobic_m_cr1_race4_p=aerobic_m_cr1_race4[3,1]
if `aerobic_m_cr1_race4_p'<0.001 {
	local aerobic_m_cr1_race4_est=string(aerobic_m_cr1_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr1_race4_p'<0.01 {
	local aerobic_m_cr1_race4_est=string(aerobic_m_cr1_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr1_race4_p'<0.05 {
	local aerobic_m_cr1_race4_est=string(aerobic_m_cr1_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr1_race4_est=string(aerobic_m_cr1_race4[1,1], "%3.2f")
}






*Meeting aerobic exercise recommendation among men in Hawaii
lincom _b[exe_aerobic_advice_m_cr2:0.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr2_race0_se="(" + string(aerobic_m_cr2_race0[2,1], "%3.2f") + ")"
local aerobic_m_cr2_race0_p=aerobic_m_cr2_race0[3,1]
if `aerobic_m_cr2_race0_p'<0.001 {
	local aerobic_m_cr2_race0_est=string(aerobic_m_cr2_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr2_race0_p'<0.01 {
	local aerobic_m_cr2_race0_est=string(aerobic_m_cr2_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr2_race0_p'<0.05 {
	local aerobic_m_cr2_race0_est=string(aerobic_m_cr2_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr2_race0_est=string(aerobic_m_cr2_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr2:1.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr2_race1_se="(" + string(aerobic_m_cr2_race1[2,1], "%3.2f") + ")"
local aerobic_m_cr2_race1_p=aerobic_m_cr2_race1[3,1]
if `aerobic_m_cr2_race1_p'<0.001 {
	local aerobic_m_cr2_race1_est=string(aerobic_m_cr2_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr2_race1_p'<0.01 {
	local aerobic_m_cr2_race1_est=string(aerobic_m_cr2_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr2_race1_p'<0.05 {
	local aerobic_m_cr2_race1_est=string(aerobic_m_cr2_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr2_race1_est=string(aerobic_m_cr2_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr2:3.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr2_race3_se="(" + string(aerobic_m_cr2_race3[2,1], "%3.2f") + ")"
local aerobic_m_cr2_race3_p=aerobic_m_cr2_race3[3,1]
if `aerobic_m_cr2_race3_p'<0.001 {
	local aerobic_m_cr2_race3_est=string(aerobic_m_cr2_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr2_race3_p'<0.01 {
	local aerobic_m_cr2_race3_est=string(aerobic_m_cr2_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr2_race3_p'<0.05 {
	local aerobic_m_cr2_race3_est=string(aerobic_m_cr2_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr2_race3_est=string(aerobic_m_cr2_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr2:4.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr2_race4_se="(" + string(aerobic_m_cr2_race4[2,1], "%3.2f") + ")"
local aerobic_m_cr2_race4_p=aerobic_m_cr2_race4[3,1]
if `aerobic_m_cr2_race4_p'<0.001 {
	local aerobic_m_cr2_race4_est=string(aerobic_m_cr2_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr2_race4_p'<0.01 {
	local aerobic_m_cr2_race4_est=string(aerobic_m_cr2_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr2_race4_p'<0.05 {
	local aerobic_m_cr2_race4_est=string(aerobic_m_cr2_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr2_race4_est=string(aerobic_m_cr2_race4[1,1], "%3.2f")
}






*Meeting aerobic exercise recommendation among men in Guam
lincom _b[exe_aerobic_advice_m_cr3:0.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr3_race0_se="(" + string(aerobic_m_cr3_race0[2,1], "%3.2f") + ")"
local aerobic_m_cr3_race0_p=aerobic_m_cr3_race0[3,1]
if `aerobic_m_cr3_race0_p'<0.001 {
	local aerobic_m_cr3_race0_est=string(aerobic_m_cr3_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr3_race0_p'<0.01 {
	local aerobic_m_cr3_race0_est=string(aerobic_m_cr3_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr3_race0_p'<0.05 {
	local aerobic_m_cr3_race0_est=string(aerobic_m_cr3_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr3_race0_est=string(aerobic_m_cr3_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr3:1.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr3_race1_se="(" + string(aerobic_m_cr3_race1[2,1], "%3.2f") + ")"
local aerobic_m_cr3_race1_p=aerobic_m_cr3_race1[3,1]
if `aerobic_m_cr3_race1_p'<0.001 {
	local aerobic_m_cr3_race1_est=string(aerobic_m_cr3_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr3_race1_p'<0.01 {
	local aerobic_m_cr3_race1_est=string(aerobic_m_cr3_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr3_race1_p'<0.05 {
	local aerobic_m_cr3_race1_est=string(aerobic_m_cr3_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr3_race1_est=string(aerobic_m_cr3_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_m_cr3:3.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr3_race3_se="(" + string(aerobic_m_cr3_race3[2,1], "%3.2f") + ")"
local aerobic_m_cr3_race3_p=aerobic_m_cr3_race3[3,1]
if `aerobic_m_cr3_race3_p'<0.001 {
	local aerobic_m_cr3_race3_est=string(aerobic_m_cr3_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr3_race3_p'<0.01 {
	local aerobic_m_cr3_race3_est=string(aerobic_m_cr3_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr3_race3_p'<0.05 {
	local aerobic_m_cr3_race3_est=string(aerobic_m_cr3_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr3_race3_est=string(aerobic_m_cr3_race3[1,1], "%3.2f")
}



lincom _b[exe_aerobic_advice_m_cr3:4.praceethnicgp_multi_sim], eform
matrix aerobic_m_cr3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_m_cr3_race4_se="(" + string(aerobic_m_cr3_race4[2,1], "%3.2f") + ")"
local aerobic_m_cr3_race4_p=aerobic_m_cr3_race4[3,1]
if `aerobic_m_cr3_race4_p'<0.001 {
	local aerobic_m_cr3_race4_est=string(aerobic_m_cr3_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_m_cr3_race4_p'<0.01 {
	local aerobic_m_cr3_race4_est=string(aerobic_m_cr3_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_m_cr3_race4_p'<0.05 {
	local aerobic_m_cr3_race4_est=string(aerobic_m_cr3_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_m_cr3_race4_est=string(aerobic_m_cr3_race4[1,1], "%3.2f")
}




*Test if the differences between NHPI and each racial/ethnic group between Guam and other census regions
lincom _b[exe_aerobic_advice_m_cr0:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:0.praceethnicgp_multi_sim], eform
local aerobic_m_cr03_race0=`r(p)'

lincom _b[exe_aerobic_advice_m_cr0:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:1.praceethnicgp_multi_sim], eform
local aerobic_m_cr03_race1=`r(p)'

lincom _b[exe_aerobic_advice_m_cr0:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:3.praceethnicgp_multi_sim], eform
local aerobic_m_cr03_race3=`r(p)'

lincom _b[exe_aerobic_advice_m_cr0:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:4.praceethnicgp_multi_sim], eform
local aerobic_m_cr03_race4=`r(p)'


lincom _b[exe_aerobic_advice_m_cr1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:0.praceethnicgp_multi_sim], eform
local aerobic_m_cr13_race0=`r(p)'

lincom _b[exe_aerobic_advice_m_cr1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:1.praceethnicgp_multi_sim], eform
local aerobic_m_cr13_race1=`r(p)'

lincom _b[exe_aerobic_advice_m_cr1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:3.praceethnicgp_multi_sim], eform
local aerobic_m_cr13_race3=`r(p)'

lincom _b[exe_aerobic_advice_m_cr1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:4.praceethnicgp_multi_sim], eform
local aerobic_m_cr13_race4=`r(p)'


lincom _b[exe_aerobic_advice_m_cr2:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:0.praceethnicgp_multi_sim], eform
local aerobic_m_cr23_race0=`r(p)'

lincom _b[exe_aerobic_advice_m_cr2:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:1.praceethnicgp_multi_sim], eform
local aerobic_m_cr23_race1=`r(p)'

lincom _b[exe_aerobic_advice_m_cr2:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:3.praceethnicgp_multi_sim], eform
local aerobic_m_cr23_race3=`r(p)'

lincom _b[exe_aerobic_advice_m_cr2:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr3:4.praceethnicgp_multi_sim], eform
local aerobic_m_cr23_race4=`r(p)'




*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local aerobic_m_cr0_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m_cr0")]
local aerobic_m_cr1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m_cr1")]
local aerobic_m_cr2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m_cr2")]
local aerobic_m_cr3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_m_cr3")]

/*
matrix Output=(aerobic_m_cr0_race0, aerobic_m_cr03_race0, aerobic_m_cr1_race0, aerobic_m_cr13_race0, aerobic_m_cr2_race0, aerobic_m_cr23_race0, aerobic_m_cr3_race0 \ ///
aerobic_m_cr0_race1, aerobic_m_cr03_race1, aerobic_m_cr1_race1, aerobic_m_cr13_race1, aerobic_m_cr2_race1, aerobic_m_cr23_race1, aerobic_m_cr3_race1 \ ///
aerobic_m_cr0_race3, aerobic_m_cr03_race3, aerobic_m_cr1_race3, aerobic_m_cr13_race3, aerobic_m_cr2_race3, aerobic_m_cr23_race3, aerobic_m_cr3_race3 \ ///
aerobic_m_cr0_race4, aerobic_m_cr03_race4, aerobic_m_cr1_race4, aerobic_m_cr13_race4, aerobic_m_cr2_race4, aerobic_m_cr23_race4, aerobic_m_cr3_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/aerobic_region_vsGuam_m", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Guam estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Guam estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Wald test with corresponding Guam estimates (p-value)") H1=("Estimates in Guam")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`aerobic_m_cr0_race0_est'" B3="`aerobic_m_cr0_race0_se'" B4="`aerobic_m_cr0_race1_est'" B5="`aerobic_m_cr0_race1_se'"
putexcel B6="`aerobic_m_cr0_race3_est'" B7="`aerobic_m_cr0_race3_se'" B8="`aerobic_m_cr0_race4_est'" B9="`aerobic_m_cr0_race4_se'"
putexcel B10=`aerobic_m_cr0_obs'
putexcel C2=`aerobic_m_cr03_race0' C4=`aerobic_m_cr03_race1' C6=`aerobic_m_cr03_race3' C8=`aerobic_m_cr03_race4', nformat(0.000)
putexcel D2="`aerobic_m_cr1_race0_est'" D3="`aerobic_m_cr1_race0_se'" D4="`aerobic_m_cr1_race1_est'" D5="`aerobic_m_cr1_race1_se'"
putexcel D6="`aerobic_m_cr1_race3_est'" D7="`aerobic_m_cr1_race3_se'" D8="`aerobic_m_cr1_race4_est'" D9="`aerobic_m_cr1_race4_se'"
putexcel D10=`aerobic_m_cr1_obs'
putexcel E2=`aerobic_m_cr13_race0' E4=`aerobic_m_cr13_race1' E6=`aerobic_m_cr13_race3' E8=`aerobic_m_cr13_race4', nformat(0.000)
putexcel F2="`aerobic_m_cr2_race0_est'" F3="`aerobic_m_cr2_race0_se'" F4="`aerobic_m_cr2_race1_est'" F5="`aerobic_m_cr2_race1_se'"
putexcel F6="`aerobic_m_cr2_race3_est'" F7="`aerobic_m_cr2_race3_se'" F8="`aerobic_m_cr2_race4_est'" F9="`aerobic_m_cr2_race4_se'"
putexcel F10=`aerobic_m_cr2_obs'
putexcel G2=`aerobic_m_cr23_race0' G4=`aerobic_m_cr23_race1' G6=`aerobic_m_cr23_race3' G8=`aerobic_m_cr23_race4', nformat(0.000)
putexcel H2="`aerobic_m_cr3_race0_est'" H3="`aerobic_m_cr3_race0_se'" H4="`aerobic_m_cr3_race1_est'" H5="`aerobic_m_cr3_race1_se'"
putexcel H6="`aerobic_m_cr3_race3_est'" H7="`aerobic_m_cr3_race3_se'" H8="`aerobic_m_cr3_race4_est'" H9="`aerobic_m_cr3_race4_se'"
putexcel H10=`aerobic_m_cr3_obs'
putexcel close






*Test if the differences between NHPI and each racial/ethnic group between Hawaii and other census regions
lincom _b[exe_aerobic_advice_m_cr0:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:0.praceethnicgp_multi_sim], eform
local aerobic_m_cr02_race0=`r(p)'

lincom _b[exe_aerobic_advice_m_cr0:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:1.praceethnicgp_multi_sim], eform
local aerobic_m_cr02_race1=`r(p)'

lincom _b[exe_aerobic_advice_m_cr0:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:3.praceethnicgp_multi_sim], eform
local aerobic_m_cr02_race3=`r(p)'

lincom _b[exe_aerobic_advice_m_cr0:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:4.praceethnicgp_multi_sim], eform
local aerobic_m_cr02_race4=`r(p)'


lincom _b[exe_aerobic_advice_m_cr1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:0.praceethnicgp_multi_sim], eform
local aerobic_m_cr12_race0=`r(p)'

lincom _b[exe_aerobic_advice_m_cr1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:1.praceethnicgp_multi_sim], eform
local aerobic_m_cr12_race1=`r(p)'

lincom _b[exe_aerobic_advice_m_cr1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:3.praceethnicgp_multi_sim], eform
local aerobic_m_cr12_race3=`r(p)'

lincom _b[exe_aerobic_advice_m_cr1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:4.praceethnicgp_multi_sim], eform
local aerobic_m_cr12_race4=`r(p)'


lincom _b[exe_aerobic_advice_m_cr3:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:0.praceethnicgp_multi_sim], eform
local aerobic_m_cr32_race0=`r(p)'

lincom _b[exe_aerobic_advice_m_cr3:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:1.praceethnicgp_multi_sim], eform
local aerobic_m_cr32_race1=`r(p)'

lincom _b[exe_aerobic_advice_m_cr3:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:3.praceethnicgp_multi_sim], eform
local aerobic_m_cr32_race3=`r(p)'

lincom _b[exe_aerobic_advice_m_cr3:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_m_cr2:4.praceethnicgp_multi_sim], eform
local aerobic_m_cr32_race4=`r(p)'


/*
matrix Output=(aerobic_m_cr0_race0, aerobic_m_cr02_race0, aerobic_m_cr1_race0, aerobic_m_cr12_race0, aerobic_m_cr2_race0, aerobic_m_cr3_race0, aerobic_m_cr32_race0 \ ///
aerobic_m_cr0_race1, aerobic_m_cr02_race1, aerobic_m_cr1_race1, aerobic_m_cr12_race1, aerobic_m_cr2_race1, aerobic_m_cr3_race1, aerobic_m_cr32_race1 \ ///
aerobic_m_cr0_race3, aerobic_m_cr02_race3, aerobic_m_cr1_race3, aerobic_m_cr12_race3, aerobic_m_cr2_race3, aerobic_m_cr3_race3, aerobic_m_cr32_race3 \ ///
aerobic_m_cr0_race4, aerobic_m_cr02_race4, aerobic_m_cr1_race4, aerobic_m_cr12_race4, aerobic_m_cr2_race4, aerobic_m_cr3_race4, aerobic_m_cr32_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/aerobic_region_vsHawaii_m", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Hawaii estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Estimates in Guam") H1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`aerobic_m_cr0_race0_est'" B3="`aerobic_m_cr0_race0_se'" B4="`aerobic_m_cr0_race1_est'" B5="`aerobic_m_cr0_race1_se'"
putexcel B6="`aerobic_m_cr0_race3_est'" B7="`aerobic_m_cr0_race3_se'" B8="`aerobic_m_cr0_race4_est'" B9="`aerobic_m_cr0_race4_se'"
putexcel B10=`aerobic_m_cr0_obs'
putexcel C2=`aerobic_m_cr02_race0' C4=`aerobic_m_cr02_race1' C6=`aerobic_m_cr02_race3' C8=`aerobic_m_cr02_race4', nformat(0.000)
putexcel D2="`aerobic_m_cr1_race0_est'" D3="`aerobic_m_cr1_race0_se'" D4="`aerobic_m_cr1_race1_est'" D5="`aerobic_m_cr1_race1_se'"
putexcel D6="`aerobic_m_cr1_race3_est'" D7="`aerobic_m_cr1_race3_se'" D8="`aerobic_m_cr1_race4_est'" D9="`aerobic_m_cr1_race4_se'"
putexcel D10=`aerobic_m_cr1_obs'
putexcel E2=`aerobic_m_cr12_race0' E4=`aerobic_m_cr12_race1' E6=`aerobic_m_cr12_race3' E8=`aerobic_m_cr12_race4', nformat(0.000)
putexcel F2="`aerobic_m_cr2_race0_est'" F3="`aerobic_m_cr2_race0_se'" F4="`aerobic_m_cr2_race1_est'" F5="`aerobic_m_cr2_race1_se'"
putexcel F6="`aerobic_m_cr2_race3_est'" F7="`aerobic_m_cr2_race3_se'" F8="`aerobic_m_cr2_race4_est'" F9="`aerobic_m_cr2_race4_se'"
putexcel F10=`aerobic_m_cr2_obs'
putexcel G2="`aerobic_m_cr3_race0_est'" G3="`aerobic_m_cr3_race0_se'" G4="`aerobic_m_cr3_race1_est'" G5="`aerobic_m_cr3_race1_se'"
putexcel G6="`aerobic_m_cr3_race3_est'" G7="`aerobic_m_cr3_race3_se'" G8="`aerobic_m_cr3_race4_est'" G9="`aerobic_m_cr3_race4_se'"
putexcel G10=`aerobic_m_cr3_obs'
putexcel H2=`aerobic_m_cr32_race0' H4=`aerobic_m_cr32_race1' H6=`aerobic_m_cr32_race3' H8=`aerobic_m_cr32_race4', nformat(0.000)
putexcel close






*Meeting muscle strengthening recommendation among men in Eastern US
lincom _b[exe_strength_advice_m_cr0:0.praceethnicgp_multi_sim], eform
matrix strength_m_cr0_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr0_race0_se="(" + string(strength_m_cr0_race0[2,1], "%3.2f") + ")"
local strength_m_cr0_race0_p=strength_m_cr0_race0[3,1]
if `strength_m_cr0_race0_p'<0.001 {
	local strength_m_cr0_race0_est=string(strength_m_cr0_race0[1,1], "%3.2f") + "***"
}
else if `strength_m_cr0_race0_p'<0.01 {
	local strength_m_cr0_race0_est=string(strength_m_cr0_race0[1,1], "%3.2f") + "**"
}
else if `strength_m_cr0_race0_p'<0.05 {
	local strength_m_cr0_race0_est=string(strength_m_cr0_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr0_race0_est=string(strength_m_cr0_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr0:1.praceethnicgp_multi_sim], eform
matrix strength_m_cr0_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr0_race1_se="(" + string(strength_m_cr0_race1[2,1], "%3.2f") + ")"
local strength_m_cr0_race1_p=strength_m_cr0_race1[3,1]
if `strength_m_cr0_race1_p'<0.001 {
	local strength_m_cr0_race1_est=string(strength_m_cr0_race1[1,1], "%3.2f") + "***"
}
else if `strength_m_cr0_race1_p'<0.01 {
	local strength_m_cr0_race1_est=string(strength_m_cr0_race1[1,1], "%3.2f") + "**"
}
else if `strength_m_cr0_race1_p'<0.05 {
	local strength_m_cr0_race1_est=string(strength_m_cr0_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr0_race1_est=string(strength_m_cr0_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr0:3.praceethnicgp_multi_sim], eform
matrix strength_m_cr0_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr0_race3_se="(" + string(strength_m_cr0_race3[2,1], "%3.2f") + ")"
local strength_m_cr0_race3_p=strength_m_cr0_race3[3,1]
if `strength_m_cr0_race3_p'<0.001 {
	local strength_m_cr0_race3_est=string(strength_m_cr0_race3[1,1], "%3.2f") + "***"
}
else if `strength_m_cr0_race3_p'<0.01 {
	local strength_m_cr0_race3_est=string(strength_m_cr0_race3[1,1], "%3.2f") + "**"
}
else if `strength_m_cr0_race3_p'<0.05 {
	local strength_m_cr0_race3_est=string(strength_m_cr0_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr0_race3_est=string(strength_m_cr0_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr0:4.praceethnicgp_multi_sim], eform
matrix strength_m_cr0_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr0_race4_se="(" + string(strength_m_cr0_race4[2,1], "%3.2f") + ")"
local strength_m_cr0_race4_p=strength_m_cr0_race4[3,1]
if `strength_m_cr0_race4_p'<0.001 {
	local strength_m_cr0_race4_est=string(strength_m_cr0_race4[1,1], "%3.2f") + "***"
}
else if `strength_m_cr0_race4_p'<0.01 {
	local strength_m_cr0_race4_est=string(strength_m_cr0_race4[1,1], "%3.2f") + "**"
}
else if `strength_m_cr0_race4_p'<0.05 {
	local strength_m_cr0_race4_est=string(strength_m_cr0_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr0_race4_est=string(strength_m_cr0_race4[1,1], "%3.2f")
}








*Meeting muscle strengthening recommendation among men in Western US
lincom _b[exe_strength_advice_m_cr1:0.praceethnicgp_multi_sim], eform
matrix strength_m_cr1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr1_race0_se="(" + string(strength_m_cr1_race0[2,1], "%3.2f") + ")"
local strength_m_cr1_race0_p=strength_m_cr1_race0[3,1]
if `strength_m_cr1_race0_p'<0.001 {
	local strength_m_cr1_race0_est=string(strength_m_cr1_race0[1,1], "%3.2f") + "***"
}
else if `strength_m_cr1_race0_p'<0.01 {
	local strength_m_cr1_race0_est=string(strength_m_cr1_race0[1,1], "%3.2f") + "**"
}
else if `strength_m_cr1_race0_p'<0.05 {
	local strength_m_cr1_race0_est=string(strength_m_cr1_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr1_race0_est=string(strength_m_cr1_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr1:1.praceethnicgp_multi_sim], eform
matrix strength_m_cr1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr1_race1_se="(" + string(strength_m_cr1_race1[2,1], "%3.2f") + ")"
local strength_m_cr1_race1_p=strength_m_cr1_race1[3,1]
if `strength_m_cr1_race1_p'<0.001 {
	local strength_m_cr1_race1_est=string(strength_m_cr1_race1[1,1], "%3.2f") + "***"
}
else if `strength_m_cr1_race1_p'<0.01 {
	local strength_m_cr1_race1_est=string(strength_m_cr1_race1[1,1], "%3.2f") + "**"
}
else if `strength_m_cr1_race1_p'<0.05 {
	local strength_m_cr1_race1_est=string(strength_m_cr1_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr1_race1_est=string(strength_m_cr1_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr1:3.praceethnicgp_multi_sim], eform
matrix strength_m_cr1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr1_race3_se="(" + string(strength_m_cr1_race3[2,1], "%3.2f") + ")"
local strength_m_cr1_race3_p=strength_m_cr1_race3[3,1]
if `strength_m_cr1_race3_p'<0.001 {
	local strength_m_cr1_race3_est=string(strength_m_cr1_race3[1,1], "%3.2f") + "***"
}
else if `strength_m_cr1_race3_p'<0.01 {
	local strength_m_cr1_race3_est=string(strength_m_cr1_race3[1,1], "%3.2f") + "**"
}
else if `strength_m_cr1_race3_p'<0.05 {
	local strength_m_cr1_race3_est=string(strength_m_cr1_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr1_race3_est=string(strength_m_cr1_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr1:4.praceethnicgp_multi_sim], eform
matrix strength_m_cr1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr1_race4_se="(" + string(strength_m_cr1_race4[2,1], "%3.2f") + ")"
local strength_m_cr1_race4_p=strength_m_cr1_race4[3,1]
if `strength_m_cr1_race4_p'<0.001 {
	local strength_m_cr1_race4_est=string(strength_m_cr1_race4[1,1], "%3.2f") + "***"
}
else if `strength_m_cr1_race4_p'<0.01 {
	local strength_m_cr1_race4_est=string(strength_m_cr1_race4[1,1], "%3.2f") + "**"
}
else if `strength_m_cr1_race4_p'<0.05 {
	local strength_m_cr1_race4_est=string(strength_m_cr1_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr1_race4_est=string(strength_m_cr1_race4[1,1], "%3.2f")
}





*Meeting muscle strengthening recommendation among men in Hawaii
lincom _b[exe_strength_advice_m_cr2:0.praceethnicgp_multi_sim], eform
matrix strength_m_cr2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr2_race0_se="(" + string(strength_m_cr2_race0[2,1], "%3.2f") + ")"
local strength_m_cr2_race0_p=strength_m_cr2_race0[3,1]
if `strength_m_cr2_race0_p'<0.001 {
	local strength_m_cr2_race0_est=string(strength_m_cr2_race0[1,1], "%3.2f") + "***"
}
else if `strength_m_cr2_race0_p'<0.01 {
	local strength_m_cr2_race0_est=string(strength_m_cr2_race0[1,1], "%3.2f") + "**"
}
else if `strength_m_cr2_race0_p'<0.05 {
	local strength_m_cr2_race0_est=string(strength_m_cr2_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr2_race0_est=string(strength_m_cr2_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr2:1.praceethnicgp_multi_sim], eform
matrix strength_m_cr2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr2_race1_se="(" + string(strength_m_cr2_race1[2,1], "%3.2f") + ")"
local strength_m_cr2_race1_p=strength_m_cr2_race1[3,1]
if `strength_m_cr2_race1_p'<0.001 {
	local strength_m_cr2_race1_est=string(strength_m_cr2_race1[1,1], "%3.2f") + "***"
}
else if `strength_m_cr2_race1_p'<0.01 {
	local strength_m_cr2_race1_est=string(strength_m_cr2_race1[1,1], "%3.2f") + "**"
}
else if `strength_m_cr2_race1_p'<0.05 {
	local strength_m_cr2_race1_est=string(strength_m_cr2_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr2_race1_est=string(strength_m_cr2_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr2:3.praceethnicgp_multi_sim], eform
matrix strength_m_cr2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr2_race3_se="(" + string(strength_m_cr2_race3[2,1], "%3.2f") + ")"
local strength_m_cr2_race3_p=strength_m_cr2_race3[3,1]
if `strength_m_cr2_race3_p'<0.001 {
	local strength_m_cr2_race3_est=string(strength_m_cr2_race3[1,1], "%3.2f") + "***"
}
else if `strength_m_cr2_race3_p'<0.01 {
	local strength_m_cr2_race3_est=string(strength_m_cr2_race3[1,1], "%3.2f") + "**"
}
else if `strength_m_cr2_race3_p'<0.05 {
	local strength_m_cr2_race3_est=string(strength_m_cr2_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr2_race3_est=string(strength_m_cr2_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr2:4.praceethnicgp_multi_sim], eform
matrix strength_m_cr2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr2_race4_se="(" + string(strength_m_cr2_race4[2,1], "%3.2f") + ")"
local strength_m_cr2_race4_p=strength_m_cr2_race4[3,1]
if `strength_m_cr2_race4_p'<0.001 {
	local strength_m_cr2_race4_est=string(strength_m_cr2_race4[1,1], "%3.2f") + "***"
}
else if `strength_m_cr2_race4_p'<0.01 {
	local strength_m_cr2_race4_est=string(strength_m_cr2_race4[1,1], "%3.2f") + "**"
}
else if `strength_m_cr2_race4_p'<0.05 {
	local strength_m_cr2_race4_est=string(strength_m_cr2_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr2_race4_est=string(strength_m_cr2_race4[1,1], "%3.2f")
}






*Meeting muscle strengthening recommendation among men in Guam
lincom _b[exe_strength_advice_m_cr3:0.praceethnicgp_multi_sim], eform
matrix strength_m_cr3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr3_race0_se="(" + string(strength_m_cr3_race0[2,1], "%3.2f") + ")"
local strength_m_cr3_race0_p=strength_m_cr3_race0[3,1]
if `strength_m_cr3_race0_p'<0.001 {
	local strength_m_cr3_race0_est=string(strength_m_cr3_race0[1,1], "%3.2f") + "***"
}
else if `strength_m_cr3_race0_p'<0.01 {
	local strength_m_cr3_race0_est=string(strength_m_cr3_race0[1,1], "%3.2f") + "**"
}
else if `strength_m_cr3_race0_p'<0.05 {
	local strength_m_cr3_race0_est=string(strength_m_cr3_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr3_race0_est=string(strength_m_cr3_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_m_cr3:1.praceethnicgp_multi_sim], eform
matrix strength_m_cr3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr3_race1_se="(" + string(strength_m_cr3_race1[2,1], "%3.2f") + ")"
local strength_m_cr3_race1_p=strength_m_cr3_race1[3,1]
if `strength_m_cr3_race1_p'<0.001 {
	local strength_m_cr3_race1_est=string(strength_m_cr3_race1[1,1], "%3.2f") + "***"
}
else if `strength_m_cr3_race1_p'<0.01 {
	local strength_m_cr3_race1_est=string(strength_m_cr3_race1[1,1], "%3.2f") + "**"
}
else if `strength_m_cr3_race1_p'<0.05 {
	local strength_m_cr3_race1_est=string(strength_m_cr3_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr3_race1_est=string(strength_m_cr3_race1[1,1], "%3.2f")
}



lincom _b[exe_strength_advice_m_cr3:3.praceethnicgp_multi_sim], eform
matrix strength_m_cr3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr3_race3_se="(" + string(strength_m_cr3_race3[2,1], "%3.2f") + ")"
local strength_m_cr3_race3_p=strength_m_cr3_race3[3,1]
if `strength_m_cr3_race3_p'<0.001 {
	local strength_m_cr3_race3_est=string(strength_m_cr3_race3[1,1], "%3.2f") + "***"
}
else if `strength_m_cr3_race3_p'<0.01 {
	local strength_m_cr3_race3_est=string(strength_m_cr3_race3[1,1], "%3.2f") + "**"
}
else if `strength_m_cr3_race3_p'<0.05 {
	local strength_m_cr3_race3_est=string(strength_m_cr3_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr3_race3_est=string(strength_m_cr3_race3[1,1], "%3.2f")
}



lincom _b[exe_strength_advice_m_cr3:4.praceethnicgp_multi_sim], eform
matrix strength_m_cr3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_m_cr3_race4_se="(" + string(strength_m_cr3_race4[2,1], "%3.2f") + ")"
local strength_m_cr3_race4_p=strength_m_cr3_race4[3,1]
if `strength_m_cr3_race4_p'<0.001 {
	local strength_m_cr3_race4_est=string(strength_m_cr3_race4[1,1], "%3.2f") + "***"
}
else if `strength_m_cr3_race4_p'<0.01 {
	local strength_m_cr3_race4_est=string(strength_m_cr3_race4[1,1], "%3.2f") + "**"
}
else if `strength_m_cr3_race4_p'<0.05 {
	local strength_m_cr3_race4_est=string(strength_m_cr3_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_m_cr3_race4_est=string(strength_m_cr3_race4[1,1], "%3.2f")
}




*Test if the differences between NHPI and each racial/ethnic group between Guam and other census regions
lincom _b[exe_strength_advice_m_cr0:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:0.praceethnicgp_multi_sim], eform
local strength_m_cr03_race0=`r(p)'

lincom _b[exe_strength_advice_m_cr0:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:1.praceethnicgp_multi_sim], eform
local strength_m_cr03_race1=`r(p)'

lincom _b[exe_strength_advice_m_cr0:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:3.praceethnicgp_multi_sim], eform
local strength_m_cr03_race3=`r(p)'

lincom _b[exe_strength_advice_m_cr0:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:4.praceethnicgp_multi_sim], eform
local strength_m_cr03_race4=`r(p)'


lincom _b[exe_strength_advice_m_cr1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:0.praceethnicgp_multi_sim], eform
local strength_m_cr13_race0=`r(p)'

lincom _b[exe_strength_advice_m_cr1:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:1.praceethnicgp_multi_sim], eform
local strength_m_cr13_race1=`r(p)'

lincom _b[exe_strength_advice_m_cr1:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:3.praceethnicgp_multi_sim], eform
local strength_m_cr13_race3=`r(p)'

lincom _b[exe_strength_advice_m_cr1:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:4.praceethnicgp_multi_sim], eform
local strength_m_cr13_race4=`r(p)'


lincom _b[exe_strength_advice_m_cr2:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:0.praceethnicgp_multi_sim], eform
local strength_m_cr23_race0=`r(p)'

lincom _b[exe_strength_advice_m_cr2:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:1.praceethnicgp_multi_sim], eform
local strength_m_cr23_race1=`r(p)'

lincom _b[exe_strength_advice_m_cr2:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:3.praceethnicgp_multi_sim], eform
local strength_m_cr23_race3=`r(p)'

lincom _b[exe_strength_advice_m_cr2:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr3:4.praceethnicgp_multi_sim], eform
local strength_m_cr23_race4=`r(p)'



*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local strength_m_cr0_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m_cr0")]
local strength_m_cr1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m_cr1")]
local strength_m_cr2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m_cr2")]
local strength_m_cr3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_m_cr3")]


/*
matrix Output=(strength_m_cr0_race0, strength_m_cr03_race0, strength_m_cr1_race0, strength_m_cr13_race0, strength_m_cr2_race0, strength_m_cr23_race0, strength_m_cr3_race0 \ ///
strength_m_cr0_race1, strength_m_cr03_race1, strength_m_cr1_race1, strength_m_cr13_race1, strength_m_cr2_race1, strength_m_cr23_race1, strength_m_cr3_race1 \ ///
strength_m_cr0_race3, strength_m_cr03_race3, strength_m_cr1_race3, strength_m_cr13_race3, strength_m_cr2_race3, strength_m_cr23_race3, strength_m_cr3_race3 \ ///
strength_m_cr0_race4, strength_m_cr03_race4, strength_m_cr1_race4, strength_m_cr13_race4, strength_m_cr2_race4, strength_m_cr23_race4, strength_m_cr3_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/strength_region_vsGuam_m", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Guam estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Guam estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Wald test with corresponding Guam estimates (p-value)") H1=("Estimates in Guam")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`strength_m_cr0_race0_est'" B3="`strength_m_cr0_race0_se'" B4="`strength_m_cr0_race1_est'" B5="`strength_m_cr0_race1_se'"
putexcel B6="`strength_m_cr0_race3_est'" B7="`strength_m_cr0_race3_se'" B8="`strength_m_cr0_race4_est'" B9="`strength_m_cr0_race4_se'"
putexcel B10=`strength_m_cr0_obs'
putexcel C2=`strength_m_cr03_race0' C4=`strength_m_cr03_race1' C6=`strength_m_cr03_race3' C8=`strength_m_cr03_race4', nformat(0.000)
putexcel D2="`strength_m_cr1_race0_est'" D3="`strength_m_cr1_race0_se'" D4="`strength_m_cr1_race1_est'" D5="`strength_m_cr1_race1_se'"
putexcel D6="`strength_m_cr1_race3_est'" D7="`strength_m_cr1_race3_se'" D8="`strength_m_cr1_race4_est'" D9="`strength_m_cr1_race4_se'"
putexcel D10=`strength_m_cr1_obs'
putexcel E2=`strength_m_cr13_race0' E4=`strength_m_cr13_race1' E6=`strength_m_cr13_race3' E8=`strength_m_cr13_race4', nformat(0.000)
putexcel F2="`strength_m_cr2_race0_est'" F3="`strength_m_cr2_race0_se'" F4="`strength_m_cr2_race1_est'" F5="`strength_m_cr2_race1_se'"
putexcel F6="`strength_m_cr2_race3_est'" F7="`strength_m_cr2_race3_se'" F8="`strength_m_cr2_race4_est'" F9="`strength_m_cr2_race4_se'"
putexcel F10=`strength_m_cr2_obs'
putexcel G2=`strength_m_cr23_race0' G4=`strength_m_cr23_race1' G6=`strength_m_cr23_race3' G8=`strength_m_cr23_race4', nformat(0.000)
putexcel H2="`strength_m_cr3_race0_est'" H3="`strength_m_cr3_race0_se'" H4="`strength_m_cr3_race1_est'" H5="`strength_m_cr3_race1_se'"
putexcel H6="`strength_m_cr3_race3_est'" H7="`strength_m_cr3_race3_se'" H8="`strength_m_cr3_race4_est'" H9="`strength_m_cr3_race4_se'"
putexcel H10=`strength_m_cr3_obs'
putexcel close






*Test if the differences between NHPI and each racial/ethnic group between Hawaii and other census regions
lincom _b[exe_strength_advice_m_cr0:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:0.praceethnicgp_multi_sim], eform
local strength_m_cr02_race0=`r(p)'

lincom _b[exe_strength_advice_m_cr0:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:1.praceethnicgp_multi_sim], eform
local strength_m_cr02_race1=`r(p)'

lincom _b[exe_strength_advice_m_cr0:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:3.praceethnicgp_multi_sim], eform
local strength_m_cr02_race3=`r(p)'

lincom _b[exe_strength_advice_m_cr0:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:4.praceethnicgp_multi_sim], eform
local strength_m_cr02_race4=`r(p)'


lincom _b[exe_strength_advice_m_cr1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:0.praceethnicgp_multi_sim], eform
local strength_m_cr12_race0=`r(p)'

lincom _b[exe_strength_advice_m_cr1:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:1.praceethnicgp_multi_sim], eform
local strength_m_cr12_race1=`r(p)'

lincom _b[exe_strength_advice_m_cr1:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:3.praceethnicgp_multi_sim], eform
local strength_m_cr12_race3=`r(p)'

lincom _b[exe_strength_advice_m_cr1:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:4.praceethnicgp_multi_sim], eform
local strength_m_cr12_race4=`r(p)'


lincom _b[exe_strength_advice_m_cr3:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:0.praceethnicgp_multi_sim], eform
local strength_m_cr32_race0=`r(p)'

lincom _b[exe_strength_advice_m_cr3:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:1.praceethnicgp_multi_sim], eform
local strength_m_cr32_race1=`r(p)'

lincom _b[exe_strength_advice_m_cr3:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:3.praceethnicgp_multi_sim], eform
local strength_m_cr32_race3=`r(p)'

lincom _b[exe_strength_advice_m_cr3:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_m_cr2:4.praceethnicgp_multi_sim], eform
local strength_m_cr32_race4=`r(p)'


/*
matrix Output=(strength_m_cr0_race0, strength_m_cr02_race0, strength_m_cr1_race0, strength_m_cr12_race0, strength_m_cr2_race0, strength_m_cr3_race0, strength_m_cr32_race0 \ ///
strength_m_cr0_race1, strength_m_cr02_race1, strength_m_cr1_race1, strength_m_cr12_race1, strength_m_cr2_race1, strength_m_cr3_race1, strength_m_cr32_race1 \ ///
strength_m_cr0_race3, strength_m_cr02_race3, strength_m_cr1_race3, strength_m_cr12_race3, strength_m_cr2_race3, strength_m_cr3_race3, strength_m_cr32_race3 \ ///
strength_m_cr0_race4, strength_m_cr02_race4, strength_m_cr1_race4, strength_m_cr12_race4, strength_m_cr2_race4, strength_m_cr3_race4, strength_m_cr32_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/strength_region_vsHawaii_m", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Hawaii estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Estimates in Guam") H1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`strength_m_cr0_race0_est'" B3="`strength_m_cr0_race0_se'" B4="`strength_m_cr0_race1_est'" B5="`strength_m_cr0_race1_se'"
putexcel B6="`strength_m_cr0_race3_est'" B7="`strength_m_cr0_race3_se'" B8="`strength_m_cr0_race4_est'" B9="`strength_m_cr0_race4_se'"
putexcel B10=`strength_m_cr0_obs'
putexcel C2=`strength_m_cr02_race0' C4=`strength_m_cr02_race1' C6=`strength_m_cr02_race3' C8=`strength_m_cr02_race4', nformat(0.000)
putexcel D2="`strength_m_cr1_race0_est'" D3="`strength_m_cr1_race0_se'" D4="`strength_m_cr1_race1_est'" D5="`strength_m_cr1_race1_se'"
putexcel D6="`strength_m_cr1_race3_est'" D7="`strength_m_cr1_race3_se'" D8="`strength_m_cr1_race4_est'" D9="`strength_m_cr1_race4_se'"
putexcel D10=`strength_m_cr1_obs'
putexcel E2=`strength_m_cr12_race0' E4=`strength_m_cr12_race1' E6=`strength_m_cr12_race3' E8=`strength_m_cr12_race4', nformat(0.000)
putexcel F2="`strength_m_cr2_race0_est'" F3="`strength_m_cr2_race0_se'" F4="`strength_m_cr2_race1_est'" F5="`strength_m_cr2_race1_se'"
putexcel F6="`strength_m_cr2_race3_est'" F7="`strength_m_cr2_race3_se'" F8="`strength_m_cr2_race4_est'" F9="`strength_m_cr2_race4_se'"
putexcel F10=`strength_m_cr2_obs'
putexcel G2="`strength_m_cr3_race0_est'" G3="`strength_m_cr3_race0_se'" G4="`strength_m_cr3_race1_est'" G5="`strength_m_cr3_race1_se'"
putexcel G6="`strength_m_cr3_race3_est'" G7="`strength_m_cr3_race3_se'" G8="`strength_m_cr3_race4_est'" G9="`strength_m_cr3_race4_se'"
putexcel G10=`strength_m_cr3_obs'
putexcel H2=`strength_m_cr32_race0' H4=`strength_m_cr32_race1' H6=`strength_m_cr32_race3' H8=`strength_m_cr32_race4', nformat(0.000)
putexcel close






















*Meeting aerobic exercise recommendation among women in Eastern US
lincom _b[exe_aerobic_advice_f_cr0:0.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr0_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr0_race0_se="(" + string(aerobic_f_cr0_race0[2,1], "%3.2f") + ")"
local aerobic_f_cr0_race0_p=aerobic_f_cr0_race0[3,1]
if `aerobic_f_cr0_race0_p'<0.001 {
	local aerobic_f_cr0_race0_est=string(aerobic_f_cr0_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr0_race0_p'<0.01 {
	local aerobic_f_cr0_race0_est=string(aerobic_f_cr0_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr0_race0_p'<0.05 {
	local aerobic_f_cr0_race0_est=string(aerobic_f_cr0_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr0_race0_est=string(aerobic_f_cr0_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr0:1.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr0_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr0_race1_se="(" + string(aerobic_f_cr0_race1[2,1], "%3.2f") + ")"
local aerobic_f_cr0_race1_p=aerobic_f_cr0_race1[3,1]
if `aerobic_f_cr0_race1_p'<0.001 {
	local aerobic_f_cr0_race1_est=string(aerobic_f_cr0_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr0_race1_p'<0.01 {
	local aerobic_f_cr0_race1_est=string(aerobic_f_cr0_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr0_race1_p'<0.05 {
	local aerobic_f_cr0_race1_est=string(aerobic_f_cr0_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr0_race1_est=string(aerobic_f_cr0_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr0:3.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr0_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr0_race3_se="(" + string(aerobic_f_cr0_race3[2,1], "%3.2f") + ")"
local aerobic_f_cr0_race3_p=aerobic_f_cr0_race3[3,1]
if `aerobic_f_cr0_race3_p'<0.001 {
	local aerobic_f_cr0_race3_est=string(aerobic_f_cr0_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr0_race3_p'<0.01 {
	local aerobic_f_cr0_race3_est=string(aerobic_f_cr0_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr0_race3_p'<0.05 {
	local aerobic_f_cr0_race3_est=string(aerobic_f_cr0_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr0_race3_est=string(aerobic_f_cr0_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr0:4.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr0_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr0_race4_se="(" + string(aerobic_f_cr0_race4[2,1], "%3.2f") + ")"
local aerobic_f_cr0_race4_p=aerobic_f_cr0_race4[3,1]
if `aerobic_f_cr0_race4_p'<0.001 {
	local aerobic_f_cr0_race4_est=string(aerobic_f_cr0_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr0_race4_p'<0.01 {
	local aerobic_f_cr0_race4_est=string(aerobic_f_cr0_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr0_race4_p'<0.05 {
	local aerobic_f_cr0_race4_est=string(aerobic_f_cr0_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr0_race4_est=string(aerobic_f_cr0_race4[1,1], "%3.2f")
}





*Meeting aerobic exercise recommendation among women in Western US
lincom _b[exe_aerobic_advice_f_cr1:0.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr1_race0_se="(" + string(aerobic_f_cr1_race0[2,1], "%3.2f") + ")"
local aerobic_f_cr1_race0_p=aerobic_f_cr1_race0[3,1]
if `aerobic_f_cr1_race0_p'<0.001 {
	local aerobic_f_cr1_race0_est=string(aerobic_f_cr1_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr1_race0_p'<0.01 {
	local aerobic_f_cr1_race0_est=string(aerobic_f_cr1_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr1_race0_p'<0.05 {
	local aerobic_f_cr1_race0_est=string(aerobic_f_cr1_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr1_race0_est=string(aerobic_f_cr1_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr1:1.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr1_race1_se="(" + string(aerobic_f_cr1_race1[2,1], "%3.2f") + ")"
local aerobic_f_cr1_race1_p=aerobic_f_cr1_race1[3,1]
if `aerobic_f_cr1_race1_p'<0.001 {
	local aerobic_f_cr1_race1_est=string(aerobic_f_cr1_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr1_race1_p'<0.01 {
	local aerobic_f_cr1_race1_est=string(aerobic_f_cr1_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr1_race1_p'<0.05 {
	local aerobic_f_cr1_race1_est=string(aerobic_f_cr1_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr1_race1_est=string(aerobic_f_cr1_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr1:3.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr1_race3_se="(" + string(aerobic_f_cr1_race3[2,1], "%3.2f") + ")"
local aerobic_f_cr1_race3_p=aerobic_f_cr1_race3[3,1]
if `aerobic_f_cr1_race3_p'<0.001 {
	local aerobic_f_cr1_race3_est=string(aerobic_f_cr1_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr1_race3_p'<0.01 {
	local aerobic_f_cr1_race3_est=string(aerobic_f_cr1_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr1_race3_p'<0.05 {
	local aerobic_f_cr1_race3_est=string(aerobic_f_cr1_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr1_race3_est=string(aerobic_f_cr1_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr1:4.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr1_race4_se="(" + string(aerobic_f_cr1_race4[2,1], "%3.2f") + ")"
local aerobic_f_cr1_race4_p=aerobic_f_cr1_race4[3,1]
if `aerobic_f_cr1_race4_p'<0.001 {
	local aerobic_f_cr1_race4_est=string(aerobic_f_cr1_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr1_race4_p'<0.01 {
	local aerobic_f_cr1_race4_est=string(aerobic_f_cr1_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr1_race4_p'<0.05 {
	local aerobic_f_cr1_race4_est=string(aerobic_f_cr1_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr1_race4_est=string(aerobic_f_cr1_race4[1,1], "%3.2f")
}






*Meeting aerobic exercise recommendation among women in Hawaii
lincom _b[exe_aerobic_advice_f_cr2:0.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr2_race0_se="(" + string(aerobic_f_cr2_race0[2,1], "%3.2f") + ")"
local aerobic_f_cr2_race0_p=aerobic_f_cr2_race0[3,1]
if `aerobic_f_cr2_race0_p'<0.001 {
	local aerobic_f_cr2_race0_est=string(aerobic_f_cr2_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr2_race0_p'<0.01 {
	local aerobic_f_cr2_race0_est=string(aerobic_f_cr2_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr2_race0_p'<0.05 {
	local aerobic_f_cr2_race0_est=string(aerobic_f_cr2_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr2_race0_est=string(aerobic_f_cr2_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr2:1.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr2_race1_se="(" + string(aerobic_f_cr2_race1[2,1], "%3.2f") + ")"
local aerobic_f_cr2_race1_p=aerobic_f_cr2_race1[3,1]
if `aerobic_f_cr2_race1_p'<0.001 {
	local aerobic_f_cr2_race1_est=string(aerobic_f_cr2_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr2_race1_p'<0.01 {
	local aerobic_f_cr2_race1_est=string(aerobic_f_cr2_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr2_race1_p'<0.05 {
	local aerobic_f_cr2_race1_est=string(aerobic_f_cr2_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr2_race1_est=string(aerobic_f_cr2_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr2:3.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr2_race3_se="(" + string(aerobic_f_cr2_race3[2,1], "%3.2f") + ")"
local aerobic_f_cr2_race3_p=aerobic_f_cr2_race3[3,1]
if `aerobic_f_cr2_race3_p'<0.001 {
	local aerobic_f_cr2_race3_est=string(aerobic_f_cr2_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr2_race3_p'<0.01 {
	local aerobic_f_cr2_race3_est=string(aerobic_f_cr2_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr2_race3_p'<0.05 {
	local aerobic_f_cr2_race3_est=string(aerobic_f_cr2_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr2_race3_est=string(aerobic_f_cr2_race3[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr2:4.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr2_race4_se="(" + string(aerobic_f_cr2_race4[2,1], "%3.2f") + ")"
local aerobic_f_cr2_race4_p=aerobic_f_cr2_race4[3,1]
if `aerobic_f_cr2_race4_p'<0.001 {
	local aerobic_f_cr2_race4_est=string(aerobic_f_cr2_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr2_race4_p'<0.01 {
	local aerobic_f_cr2_race4_est=string(aerobic_f_cr2_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr2_race4_p'<0.05 {
	local aerobic_f_cr2_race4_est=string(aerobic_f_cr2_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr2_race4_est=string(aerobic_f_cr2_race4[1,1], "%3.2f")
}






*Meeting aerobic exercise recommendation among women in Guam
lincom _b[exe_aerobic_advice_f_cr3:0.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr3_race0_se="(" + string(aerobic_f_cr3_race0[2,1], "%3.2f") + ")"
local aerobic_f_cr3_race0_p=aerobic_f_cr3_race0[3,1]
if `aerobic_f_cr3_race0_p'<0.001 {
	local aerobic_f_cr3_race0_est=string(aerobic_f_cr3_race0[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr3_race0_p'<0.01 {
	local aerobic_f_cr3_race0_est=string(aerobic_f_cr3_race0[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr3_race0_p'<0.05 {
	local aerobic_f_cr3_race0_est=string(aerobic_f_cr3_race0[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr3_race0_est=string(aerobic_f_cr3_race0[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr3:1.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr3_race1_se="(" + string(aerobic_f_cr3_race1[2,1], "%3.2f") + ")"
local aerobic_f_cr3_race1_p=aerobic_f_cr3_race1[3,1]
if `aerobic_f_cr3_race1_p'<0.001 {
	local aerobic_f_cr3_race1_est=string(aerobic_f_cr3_race1[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr3_race1_p'<0.01 {
	local aerobic_f_cr3_race1_est=string(aerobic_f_cr3_race1[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr3_race1_p'<0.05 {
	local aerobic_f_cr3_race1_est=string(aerobic_f_cr3_race1[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr3_race1_est=string(aerobic_f_cr3_race1[1,1], "%3.2f")
}


lincom _b[exe_aerobic_advice_f_cr3:3.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr3_race3_se="(" + string(aerobic_f_cr3_race3[2,1], "%3.2f") + ")"
local aerobic_f_cr3_race3_p=aerobic_f_cr3_race3[3,1]
if `aerobic_f_cr3_race3_p'<0.001 {
	local aerobic_f_cr3_race3_est=string(aerobic_f_cr3_race3[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr3_race3_p'<0.01 {
	local aerobic_f_cr3_race3_est=string(aerobic_f_cr3_race3[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr3_race3_p'<0.05 {
	local aerobic_f_cr3_race3_est=string(aerobic_f_cr3_race3[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr3_race3_est=string(aerobic_f_cr3_race3[1,1], "%3.2f")
}



lincom _b[exe_aerobic_advice_f_cr3:4.praceethnicgp_multi_sim], eform
matrix aerobic_f_cr3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local aerobic_f_cr3_race4_se="(" + string(aerobic_f_cr3_race4[2,1], "%3.2f") + ")"
local aerobic_f_cr3_race4_p=aerobic_f_cr3_race4[3,1]
if `aerobic_f_cr3_race4_p'<0.001 {
	local aerobic_f_cr3_race4_est=string(aerobic_f_cr3_race4[1,1], "%3.2f") + "***"
}
else if `aerobic_f_cr3_race4_p'<0.01 {
	local aerobic_f_cr3_race4_est=string(aerobic_f_cr3_race4[1,1], "%3.2f") + "**"
}
else if `aerobic_f_cr3_race4_p'<0.05 {
	local aerobic_f_cr3_race4_est=string(aerobic_f_cr3_race4[1,1], "%3.2f") + "*"
}
else {
	local aerobic_f_cr3_race4_est=string(aerobic_f_cr3_race4[1,1], "%3.2f")
}



*Test if the differences between NHPI and each racial/ethnic group between Guam and other census regions
lincom _b[exe_aerobic_advice_f_cr0:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:0.praceethnicgp_multi_sim], eform
local aerobic_f_cr03_race0=`r(p)'

lincom _b[exe_aerobic_advice_f_cr0:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:1.praceethnicgp_multi_sim], eform
local aerobic_f_cr03_race1=`r(p)'

lincom _b[exe_aerobic_advice_f_cr0:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:3.praceethnicgp_multi_sim], eform
local aerobic_f_cr03_race3=`r(p)'

lincom _b[exe_aerobic_advice_f_cr0:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:4.praceethnicgp_multi_sim], eform
local aerobic_f_cr03_race4=`r(p)'


lincom _b[exe_aerobic_advice_f_cr1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:0.praceethnicgp_multi_sim], eform
local aerobic_f_cr13_race0=`r(p)'

lincom _b[exe_aerobic_advice_f_cr1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:1.praceethnicgp_multi_sim], eform
local aerobic_f_cr13_race1=`r(p)'

lincom _b[exe_aerobic_advice_f_cr1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:3.praceethnicgp_multi_sim], eform
local aerobic_f_cr13_race3=`r(p)'

lincom _b[exe_aerobic_advice_f_cr1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:4.praceethnicgp_multi_sim], eform
local aerobic_f_cr13_race4=`r(p)'


lincom _b[exe_aerobic_advice_f_cr2:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:0.praceethnicgp_multi_sim], eform
local aerobic_f_cr23_race0=`r(p)'

lincom _b[exe_aerobic_advice_f_cr2:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:1.praceethnicgp_multi_sim], eform
local aerobic_f_cr23_race1=`r(p)'

lincom _b[exe_aerobic_advice_f_cr2:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:3.praceethnicgp_multi_sim], eform
local aerobic_f_cr23_race3=`r(p)'

lincom _b[exe_aerobic_advice_f_cr2:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr3:4.praceethnicgp_multi_sim], eform
local aerobic_f_cr23_race4=`r(p)'




*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local aerobic_f_cr0_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f_cr0")]
local aerobic_f_cr1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f_cr1")]
local aerobic_f_cr2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f_cr2")]
local aerobic_f_cr3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_aerobic_advice_f_cr3")]

/*
matrix Output=(aerobic_f_cr0_race0, aerobic_f_cr03_race0, aerobic_f_cr1_race0, aerobic_f_cr13_race0, aerobic_f_cr2_race0, aerobic_f_cr23_race0, aerobic_f_cr3_race0 \ ///
aerobic_f_cr0_race1, aerobic_f_cr03_race1, aerobic_f_cr1_race1, aerobic_f_cr13_race1, aerobic_f_cr2_race1, aerobic_f_cr23_race1, aerobic_f_cr3_race1 \ ///
aerobic_f_cr0_race3, aerobic_f_cr03_race3, aerobic_f_cr1_race3, aerobic_f_cr13_race3, aerobic_f_cr2_race3, aerobic_f_cr23_race3, aerobic_f_cr3_race3 \ ///
aerobic_f_cr0_race4, aerobic_f_cr03_race4, aerobic_f_cr1_race4, aerobic_f_cr13_race4, aerobic_f_cr2_race4, aerobic_f_cr23_race4, aerobic_f_cr3_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/aerobic_region_vsGuam_f", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Guam estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Guam estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Wald test with corresponding Guam estimates (p-value)") H1=("Estimates in Guam")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`aerobic_f_cr0_race0_est'" B3="`aerobic_f_cr0_race0_se'" B4="`aerobic_f_cr0_race1_est'" B5="`aerobic_f_cr0_race1_se'"
putexcel B6="`aerobic_f_cr0_race3_est'" B7="`aerobic_f_cr0_race3_se'" B8="`aerobic_f_cr0_race4_est'" B9="`aerobic_f_cr0_race4_se'"
putexcel B10=`aerobic_f_cr0_obs'
putexcel C2=`aerobic_f_cr03_race0' C4=`aerobic_f_cr03_race1' C6=`aerobic_f_cr03_race3' C8=`aerobic_f_cr03_race4', nformat(0.000)
putexcel D2="`aerobic_f_cr1_race0_est'" D3="`aerobic_f_cr1_race0_se'" D4="`aerobic_f_cr1_race1_est'" D5="`aerobic_f_cr1_race1_se'"
putexcel D6="`aerobic_f_cr1_race3_est'" D7="`aerobic_f_cr1_race3_se'" D8="`aerobic_f_cr1_race4_est'" D9="`aerobic_f_cr1_race4_se'"
putexcel D10=`aerobic_f_cr1_obs'
putexcel E2=`aerobic_f_cr13_race0' E4=`aerobic_f_cr13_race1' E6=`aerobic_f_cr13_race3' E8=`aerobic_f_cr13_race4', nformat(0.000)
putexcel F2="`aerobic_f_cr2_race0_est'" F3="`aerobic_f_cr2_race0_se'" F4="`aerobic_f_cr2_race1_est'" F5="`aerobic_f_cr2_race1_se'"
putexcel F6="`aerobic_f_cr2_race3_est'" F7="`aerobic_f_cr2_race3_se'" F8="`aerobic_f_cr2_race4_est'" F9="`aerobic_f_cr2_race4_se'"
putexcel F10=`aerobic_f_cr2_obs'
putexcel G2=`aerobic_f_cr23_race0' G4=`aerobic_f_cr23_race1' G6=`aerobic_f_cr23_race3' G8=`aerobic_f_cr23_race4', nformat(0.000)
putexcel H2="`aerobic_f_cr3_race0_est'" H3="`aerobic_f_cr3_race0_se'" H4="`aerobic_f_cr3_race1_est'" H5="`aerobic_f_cr3_race1_se'"
putexcel H6="`aerobic_f_cr3_race3_est'" H7="`aerobic_f_cr3_race3_se'" H8="`aerobic_f_cr3_race4_est'" H9="`aerobic_f_cr3_race4_se'"
putexcel H10=`aerobic_f_cr3_obs'
putexcel close






*Test if the differences between NHPI and each racial/ethnic group between Hawaii and other census regions
lincom _b[exe_aerobic_advice_f_cr0:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:0.praceethnicgp_multi_sim], eform
local aerobic_f_cr02_race0=`r(p)'

lincom _b[exe_aerobic_advice_f_cr0:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:1.praceethnicgp_multi_sim], eform
local aerobic_f_cr02_race1=`r(p)'

lincom _b[exe_aerobic_advice_f_cr0:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:3.praceethnicgp_multi_sim], eform
local aerobic_f_cr02_race3=`r(p)'

lincom _b[exe_aerobic_advice_f_cr0:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:4.praceethnicgp_multi_sim], eform
local aerobic_f_cr02_race4=`r(p)'


lincom _b[exe_aerobic_advice_f_cr1:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:0.praceethnicgp_multi_sim], eform
local aerobic_f_cr12_race0=`r(p)'

lincom _b[exe_aerobic_advice_f_cr1:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:1.praceethnicgp_multi_sim], eform
local aerobic_f_cr12_race1=`r(p)'

lincom _b[exe_aerobic_advice_f_cr1:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:3.praceethnicgp_multi_sim], eform
local aerobic_f_cr12_race3=`r(p)'

lincom _b[exe_aerobic_advice_f_cr1:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:4.praceethnicgp_multi_sim], eform
local aerobic_f_cr12_race4=`r(p)'


lincom _b[exe_aerobic_advice_f_cr3:0.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:0.praceethnicgp_multi_sim], eform
local aerobic_f_cr32_race0=`r(p)'

lincom _b[exe_aerobic_advice_f_cr3:1.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:1.praceethnicgp_multi_sim], eform
local aerobic_f_cr32_race1=`r(p)'

lincom _b[exe_aerobic_advice_f_cr3:3.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:3.praceethnicgp_multi_sim], eform
local aerobic_f_cr32_race3=`r(p)'

lincom _b[exe_aerobic_advice_f_cr3:4.praceethnicgp_multi_sim]-_b[exe_aerobic_advice_f_cr2:4.praceethnicgp_multi_sim], eform
local aerobic_f_cr32_race4=`r(p)'


/*
matrix Output=(aerobic_f_cr0_race0, aerobic_f_cr02_race0, aerobic_f_cr1_race0, aerobic_f_cr12_race0, aerobic_f_cr2_race0, aerobic_f_cr3_race0, aerobic_f_cr32_race0 \ ///
aerobic_f_cr0_race1, aerobic_f_cr02_race1, aerobic_f_cr1_race1, aerobic_f_cr12_race1, aerobic_f_cr2_race1, aerobic_f_cr3_race1, aerobic_f_cr32_race1 \ ///
aerobic_f_cr0_race3, aerobic_f_cr02_race3, aerobic_f_cr1_race3, aerobic_f_cr12_race3, aerobic_f_cr2_race3, aerobic_f_cr3_race3, aerobic_f_cr32_race3 \ ///
aerobic_f_cr0_race4, aerobic_f_cr02_race4, aerobic_f_cr1_race4, aerobic_f_cr12_race4, aerobic_f_cr2_race4, aerobic_f_cr3_race4, aerobic_f_cr32_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/aerobic_region_vsHawaii_f", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Hawaii estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Estimates in Guam") H1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`aerobic_f_cr0_race0_est'" B3="`aerobic_f_cr0_race0_se'" B4="`aerobic_f_cr0_race1_est'" B5="`aerobic_f_cr0_race1_se'"
putexcel B6="`aerobic_f_cr0_race3_est'" B7="`aerobic_f_cr0_race3_se'" B8="`aerobic_f_cr0_race4_est'" B9="`aerobic_f_cr0_race4_se'"
putexcel B10=`aerobic_f_cr0_obs'
putexcel C2=`aerobic_f_cr02_race0' C4=`aerobic_f_cr02_race1' C6=`aerobic_f_cr02_race3' C8=`aerobic_f_cr02_race4', nformat(0.000)
putexcel D2="`aerobic_f_cr1_race0_est'" D3="`aerobic_f_cr1_race0_se'" D4="`aerobic_f_cr1_race1_est'" D5="`aerobic_f_cr1_race1_se'"
putexcel D6="`aerobic_f_cr1_race3_est'" D7="`aerobic_f_cr1_race3_se'" D8="`aerobic_f_cr1_race4_est'" D9="`aerobic_f_cr1_race4_se'"
putexcel D10=`aerobic_f_cr1_obs'
putexcel E2=`aerobic_f_cr12_race0' E4=`aerobic_f_cr12_race1' E6=`aerobic_f_cr12_race3' E8=`aerobic_f_cr12_race4', nformat(0.000)
putexcel F2="`aerobic_f_cr2_race0_est'" F3="`aerobic_f_cr2_race0_se'" F4="`aerobic_f_cr2_race1_est'" F5="`aerobic_f_cr2_race1_se'"
putexcel F6="`aerobic_f_cr2_race3_est'" F7="`aerobic_f_cr2_race3_se'" F8="`aerobic_f_cr2_race4_est'" F9="`aerobic_f_cr2_race4_se'"
putexcel F10=`aerobic_f_cr2_obs'
putexcel G2="`aerobic_f_cr3_race0_est'" G3="`aerobic_f_cr3_race0_se'" G4="`aerobic_f_cr3_race1_est'" G5="`aerobic_f_cr3_race1_se'"
putexcel G6="`aerobic_f_cr3_race3_est'" G7="`aerobic_f_cr3_race3_se'" G8="`aerobic_f_cr3_race4_est'" G9="`aerobic_f_cr3_race4_se'"
putexcel G10=`aerobic_f_cr3_obs'
putexcel H2=`aerobic_f_cr32_race0' H4=`aerobic_f_cr32_race1' H6=`aerobic_f_cr32_race3' H8=`aerobic_f_cr32_race4', nformat(0.000)
putexcel close






*Meeting muscle strengthening recommendation among women in Eastern US
lincom _b[exe_strength_advice_f_cr0:0.praceethnicgp_multi_sim], eform
matrix strength_f_cr0_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr0_race0_se="(" + string(strength_f_cr0_race0[2,1], "%3.2f") + ")"
local strength_f_cr0_race0_p=strength_f_cr0_race0[3,1]
if `strength_f_cr0_race0_p'<0.001 {
	local strength_f_cr0_race0_est=string(strength_f_cr0_race0[1,1], "%3.2f") + "***"
}
else if `strength_f_cr0_race0_p'<0.01 {
	local strength_f_cr0_race0_est=string(strength_f_cr0_race0[1,1], "%3.2f") + "**"
}
else if `strength_f_cr0_race0_p'<0.05 {
	local strength_f_cr0_race0_est=string(strength_f_cr0_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr0_race0_est=string(strength_f_cr0_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr0:1.praceethnicgp_multi_sim], eform
matrix strength_f_cr0_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr0_race1_se="(" + string(strength_f_cr0_race1[2,1], "%3.2f") + ")"
local strength_f_cr0_race1_p=strength_f_cr0_race1[3,1]
if `strength_f_cr0_race1_p'<0.001 {
	local strength_f_cr0_race1_est=string(strength_f_cr0_race1[1,1], "%3.2f") + "***"
}
else if `strength_f_cr0_race1_p'<0.01 {
	local strength_f_cr0_race1_est=string(strength_f_cr0_race1[1,1], "%3.2f") + "**"
}
else if `strength_f_cr0_race1_p'<0.05 {
	local strength_f_cr0_race1_est=string(strength_f_cr0_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr0_race1_est=string(strength_f_cr0_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr0:3.praceethnicgp_multi_sim], eform
matrix strength_f_cr0_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr0_race3_se="(" + string(strength_f_cr0_race3[2,1], "%3.2f") + ")"
local strength_f_cr0_race3_p=strength_f_cr0_race3[3,1]
if `strength_f_cr0_race3_p'<0.001 {
	local strength_f_cr0_race3_est=string(strength_f_cr0_race3[1,1], "%3.2f") + "***"
}
else if `strength_f_cr0_race3_p'<0.01 {
	local strength_f_cr0_race3_est=string(strength_f_cr0_race3[1,1], "%3.2f") + "**"
}
else if `strength_f_cr0_race3_p'<0.05 {
	local strength_f_cr0_race3_est=string(strength_f_cr0_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr0_race3_est=string(strength_f_cr0_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr0:4.praceethnicgp_multi_sim], eform
matrix strength_f_cr0_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr0_race4_se="(" + string(strength_f_cr0_race4[2,1], "%3.2f") + ")"
local strength_f_cr0_race4_p=strength_f_cr0_race4[3,1]
if `strength_f_cr0_race4_p'<0.001 {
	local strength_f_cr0_race4_est=string(strength_f_cr0_race4[1,1], "%3.2f") + "***"
}
else if `strength_f_cr0_race4_p'<0.01 {
	local strength_f_cr0_race4_est=string(strength_f_cr0_race4[1,1], "%3.2f") + "**"
}
else if `strength_f_cr0_race4_p'<0.05 {
	local strength_f_cr0_race4_est=string(strength_f_cr0_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr0_race4_est=string(strength_f_cr0_race4[1,1], "%3.2f")
}








*Meeting muscle strengthening recommendation among women in Western US
lincom _b[exe_strength_advice_f_cr1:0.praceethnicgp_multi_sim], eform
matrix strength_f_cr1_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr1_race0_se="(" + string(strength_f_cr1_race0[2,1], "%3.2f") + ")"
local strength_f_cr1_race0_p=strength_f_cr1_race0[3,1]
if `strength_f_cr1_race0_p'<0.001 {
	local strength_f_cr1_race0_est=string(strength_f_cr1_race0[1,1], "%3.2f") + "***"
}
else if `strength_f_cr1_race0_p'<0.01 {
	local strength_f_cr1_race0_est=string(strength_f_cr1_race0[1,1], "%3.2f") + "**"
}
else if `strength_f_cr1_race0_p'<0.05 {
	local strength_f_cr1_race0_est=string(strength_f_cr1_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr1_race0_est=string(strength_f_cr1_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr1:1.praceethnicgp_multi_sim], eform
matrix strength_f_cr1_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr1_race1_se="(" + string(strength_f_cr1_race1[2,1], "%3.2f") + ")"
local strength_f_cr1_race1_p=strength_f_cr1_race1[3,1]
if `strength_f_cr1_race1_p'<0.001 {
	local strength_f_cr1_race1_est=string(strength_f_cr1_race1[1,1], "%3.2f") + "***"
}
else if `strength_f_cr1_race1_p'<0.01 {
	local strength_f_cr1_race1_est=string(strength_f_cr1_race1[1,1], "%3.2f") + "**"
}
else if `strength_f_cr1_race1_p'<0.05 {
	local strength_f_cr1_race1_est=string(strength_f_cr1_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr1_race1_est=string(strength_f_cr1_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr1:3.praceethnicgp_multi_sim], eform
matrix strength_f_cr1_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr1_race3_se="(" + string(strength_f_cr1_race3[2,1], "%3.2f") + ")"
local strength_f_cr1_race3_p=strength_f_cr1_race3[3,1]
if `strength_f_cr1_race3_p'<0.001 {
	local strength_f_cr1_race3_est=string(strength_f_cr1_race3[1,1], "%3.2f") + "***"
}
else if `strength_f_cr1_race3_p'<0.01 {
	local strength_f_cr1_race3_est=string(strength_f_cr1_race3[1,1], "%3.2f") + "**"
}
else if `strength_f_cr1_race3_p'<0.05 {
	local strength_f_cr1_race3_est=string(strength_f_cr1_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr1_race3_est=string(strength_f_cr1_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr1:4.praceethnicgp_multi_sim], eform
matrix strength_f_cr1_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr1_race4_se="(" + string(strength_f_cr1_race4[2,1], "%3.2f") + ")"
local strength_f_cr1_race4_p=strength_f_cr1_race4[3,1]
if `strength_f_cr1_race4_p'<0.001 {
	local strength_f_cr1_race4_est=string(strength_f_cr1_race4[1,1], "%3.2f") + "***"
}
else if `strength_f_cr1_race4_p'<0.01 {
	local strength_f_cr1_race4_est=string(strength_f_cr1_race4[1,1], "%3.2f") + "**"
}
else if `strength_f_cr1_race4_p'<0.05 {
	local strength_f_cr1_race4_est=string(strength_f_cr1_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr1_race4_est=string(strength_f_cr1_race4[1,1], "%3.2f")
}





*Meeting muscle strengthening recommendation among women in Hawaii
lincom _b[exe_strength_advice_f_cr2:0.praceethnicgp_multi_sim], eform
matrix strength_f_cr2_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr2_race0_se="(" + string(strength_f_cr2_race0[2,1], "%3.2f") + ")"
local strength_f_cr2_race0_p=strength_f_cr2_race0[3,1]
if `strength_f_cr2_race0_p'<0.001 {
	local strength_f_cr2_race0_est=string(strength_f_cr2_race0[1,1], "%3.2f") + "***"
}
else if `strength_f_cr2_race0_p'<0.01 {
	local strength_f_cr2_race0_est=string(strength_f_cr2_race0[1,1], "%3.2f") + "**"
}
else if `strength_f_cr2_race0_p'<0.05 {
	local strength_f_cr2_race0_est=string(strength_f_cr2_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr2_race0_est=string(strength_f_cr2_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr2:1.praceethnicgp_multi_sim], eform
matrix strength_f_cr2_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr2_race1_se="(" + string(strength_f_cr2_race1[2,1], "%3.2f") + ")"
local strength_f_cr2_race1_p=strength_f_cr2_race1[3,1]
if `strength_f_cr2_race1_p'<0.001 {
	local strength_f_cr2_race1_est=string(strength_f_cr2_race1[1,1], "%3.2f") + "***"
}
else if `strength_f_cr2_race1_p'<0.01 {
	local strength_f_cr2_race1_est=string(strength_f_cr2_race1[1,1], "%3.2f") + "**"
}
else if `strength_f_cr2_race1_p'<0.05 {
	local strength_f_cr2_race1_est=string(strength_f_cr2_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr2_race1_est=string(strength_f_cr2_race1[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr2:3.praceethnicgp_multi_sim], eform
matrix strength_f_cr2_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr2_race3_se="(" + string(strength_f_cr2_race3[2,1], "%3.2f") + ")"
local strength_f_cr2_race3_p=strength_f_cr2_race3[3,1]
if `strength_f_cr2_race3_p'<0.001 {
	local strength_f_cr2_race3_est=string(strength_f_cr2_race3[1,1], "%3.2f") + "***"
}
else if `strength_f_cr2_race3_p'<0.01 {
	local strength_f_cr2_race3_est=string(strength_f_cr2_race3[1,1], "%3.2f") + "**"
}
else if `strength_f_cr2_race3_p'<0.05 {
	local strength_f_cr2_race3_est=string(strength_f_cr2_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr2_race3_est=string(strength_f_cr2_race3[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr2:4.praceethnicgp_multi_sim], eform
matrix strength_f_cr2_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr2_race4_se="(" + string(strength_f_cr2_race4[2,1], "%3.2f") + ")"
local strength_f_cr2_race4_p=strength_f_cr2_race4[3,1]
if `strength_f_cr2_race4_p'<0.001 {
	local strength_f_cr2_race4_est=string(strength_f_cr2_race4[1,1], "%3.2f") + "***"
}
else if `strength_f_cr2_race4_p'<0.01 {
	local strength_f_cr2_race4_est=string(strength_f_cr2_race4[1,1], "%3.2f") + "**"
}
else if `strength_f_cr2_race4_p'<0.05 {
	local strength_f_cr2_race4_est=string(strength_f_cr2_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr2_race4_est=string(strength_f_cr2_race4[1,1], "%3.2f")
}






*Meeting muscle strengthening recommendation among women in Guam
lincom _b[exe_strength_advice_f_cr3:0.praceethnicgp_multi_sim], eform
matrix strength_f_cr3_race0=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr3_race0_se="(" + string(strength_f_cr3_race0[2,1], "%3.2f") + ")"
local strength_f_cr3_race0_p=strength_f_cr3_race0[3,1]
if `strength_f_cr3_race0_p'<0.001 {
	local strength_f_cr3_race0_est=string(strength_f_cr3_race0[1,1], "%3.2f") + "***"
}
else if `strength_f_cr3_race0_p'<0.01 {
	local strength_f_cr3_race0_est=string(strength_f_cr3_race0[1,1], "%3.2f") + "**"
}
else if `strength_f_cr3_race0_p'<0.05 {
	local strength_f_cr3_race0_est=string(strength_f_cr3_race0[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr3_race0_est=string(strength_f_cr3_race0[1,1], "%3.2f")
}


lincom _b[exe_strength_advice_f_cr3:1.praceethnicgp_multi_sim], eform
matrix strength_f_cr3_race1=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr3_race1_se="(" + string(strength_f_cr3_race1[2,1], "%3.2f") + ")"
local strength_f_cr3_race1_p=strength_f_cr3_race1[3,1]
if `strength_f_cr3_race1_p'<0.001 {
	local strength_f_cr3_race1_est=string(strength_f_cr3_race1[1,1], "%3.2f") + "***"
}
else if `strength_f_cr3_race1_p'<0.01 {
	local strength_f_cr3_race1_est=string(strength_f_cr3_race1[1,1], "%3.2f") + "**"
}
else if `strength_f_cr3_race1_p'<0.05 {
	local strength_f_cr3_race1_est=string(strength_f_cr3_race1[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr3_race1_est=string(strength_f_cr3_race1[1,1], "%3.2f")
}



lincom _b[exe_strength_advice_f_cr3:3.praceethnicgp_multi_sim], eform
matrix strength_f_cr3_race3=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr3_race3_se="(" + string(strength_f_cr3_race3[2,1], "%3.2f") + ")"
local strength_f_cr3_race3_p=strength_f_cr3_race3[3,1]
if `strength_f_cr3_race3_p'<0.001 {
	local strength_f_cr3_race3_est=string(strength_f_cr3_race3[1,1], "%3.2f") + "***"
}
else if `strength_f_cr3_race3_p'<0.01 {
	local strength_f_cr3_race3_est=string(strength_f_cr3_race3[1,1], "%3.2f") + "**"
}
else if `strength_f_cr3_race3_p'<0.05 {
	local strength_f_cr3_race3_est=string(strength_f_cr3_race3[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr3_race3_est=string(strength_f_cr3_race3[1,1], "%3.2f")
}



lincom _b[exe_strength_advice_f_cr3:4.praceethnicgp_multi_sim], eform
matrix strength_f_cr3_race4=(`r(estimate)' \ `r(se)' \ `r(p)')
local strength_f_cr3_race4_se="(" + string(strength_f_cr3_race4[2,1], "%3.2f") + ")"
local strength_f_cr3_race4_p=strength_f_cr3_race4[3,1]
if `strength_f_cr3_race4_p'<0.001 {
	local strength_f_cr3_race4_est=string(strength_f_cr3_race4[1,1], "%3.2f") + "***"
}
else if `strength_f_cr3_race4_p'<0.01 {
	local strength_f_cr3_race4_est=string(strength_f_cr3_race4[1,1], "%3.2f") + "**"
}
else if `strength_f_cr3_race4_p'<0.05 {
	local strength_f_cr3_race4_est=string(strength_f_cr3_race4[1,1], "%3.2f") + "*"
}
else {
	local strength_f_cr3_race4_est=string(strength_f_cr3_race4[1,1], "%3.2f")
}





*Test if the differences between NHPI and each racial/ethnic group between Guam and other census regions
lincom _b[exe_strength_advice_f_cr0:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:0.praceethnicgp_multi_sim], eform
local strength_f_cr03_race0=`r(p)'

lincom _b[exe_strength_advice_f_cr0:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:1.praceethnicgp_multi_sim], eform
local strength_f_cr03_race1=`r(p)'

lincom _b[exe_strength_advice_f_cr0:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:3.praceethnicgp_multi_sim], eform
local strength_f_cr03_race3=`r(p)'

lincom _b[exe_strength_advice_f_cr0:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:4.praceethnicgp_multi_sim], eform
local strength_f_cr03_race4=`r(p)'


lincom _b[exe_strength_advice_f_cr1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:0.praceethnicgp_multi_sim], eform
local strength_f_cr13_race0=`r(p)'

lincom _b[exe_strength_advice_f_cr1:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:1.praceethnicgp_multi_sim], eform
local strength_f_cr13_race1=`r(p)'

lincom _b[exe_strength_advice_f_cr1:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:3.praceethnicgp_multi_sim], eform
local strength_f_cr13_race3=`r(p)'

lincom _b[exe_strength_advice_f_cr1:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:4.praceethnicgp_multi_sim], eform
local strength_f_cr13_race4=`r(p)'


lincom _b[exe_strength_advice_f_cr2:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:0.praceethnicgp_multi_sim], eform
local strength_f_cr23_race0=`r(p)'

lincom _b[exe_strength_advice_f_cr2:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:1.praceethnicgp_multi_sim], eform
local strength_f_cr23_race1=`r(p)'

lincom _b[exe_strength_advice_f_cr2:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:3.praceethnicgp_multi_sim], eform
local strength_f_cr23_race3=`r(p)'

lincom _b[exe_strength_advice_f_cr2:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr3:4.praceethnicgp_multi_sim], eform
local strength_f_cr23_race4=`r(p)'



*Store the number of observations in each model
matrix `mname'_obs=e(_N)
local strength_f_cr0_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f_cr0")]
local strength_f_cr1_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f_cr1")]
local strength_f_cr2_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f_cr2")]
local strength_f_cr3_obs=`mname'_obs[1,colnumb(`mname'_obs,"exe_strength_advice_f_cr3")]


/*
matrix Output=(strength_f_cr0_race0, strength_f_cr03_race0, strength_f_cr1_race0, strength_f_cr13_race0, strength_f_cr2_race0, strength_f_cr23_race0, strength_f_cr3_race0 \ ///
strength_f_cr0_race1, strength_f_cr03_race1, strength_f_cr1_race1, strength_f_cr13_race1, strength_f_cr2_race1, strength_f_cr23_race1, strength_f_cr3_race1 \ ///
strength_f_cr0_race3, strength_f_cr03_race3, strength_f_cr1_race3, strength_f_cr13_race3, strength_f_cr2_race3, strength_f_cr23_race3, strength_f_cr3_race3 \ ///
strength_f_cr0_race4, strength_f_cr03_race4, strength_f_cr1_race4, strength_f_cr13_race4, strength_f_cr2_race4, strength_f_cr23_race4, strength_f_cr3_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/strength_region_vsGuam_f", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Guam estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Guam estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Wald test with corresponding Guam estimates (p-value)") H1=("Estimates in Guam")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`strength_f_cr0_race0_est'" B3="`strength_f_cr0_race0_se'" B4="`strength_f_cr0_race1_est'" B5="`strength_f_cr0_race1_se'"
putexcel B6="`strength_f_cr0_race3_est'" B7="`strength_f_cr0_race3_se'" B8="`strength_f_cr0_race4_est'" B9="`strength_f_cr0_race4_se'"
putexcel B10=`strength_f_cr0_obs'
putexcel C2=`strength_f_cr03_race0' C4=`strength_f_cr03_race1' C6=`strength_f_cr03_race3' C8=`strength_f_cr03_race4', nformat(0.000)
putexcel D2="`strength_f_cr1_race0_est'" D3="`strength_f_cr1_race0_se'" D4="`strength_f_cr1_race1_est'" D5="`strength_f_cr1_race1_se'"
putexcel D6="`strength_f_cr1_race3_est'" D7="`strength_f_cr1_race3_se'" D8="`strength_f_cr1_race4_est'" D9="`strength_f_cr1_race4_se'"
putexcel D10=`strength_f_cr1_obs'
putexcel E2=`strength_f_cr13_race0' E4=`strength_f_cr13_race1' E6=`strength_f_cr13_race3' E8=`strength_f_cr13_race4', nformat(0.000)
putexcel F2="`strength_f_cr2_race0_est'" F3="`strength_f_cr2_race0_se'" F4="`strength_f_cr2_race1_est'" F5="`strength_f_cr2_race1_se'"
putexcel F6="`strength_f_cr2_race3_est'" F7="`strength_f_cr2_race3_se'" F8="`strength_f_cr2_race4_est'" F9="`strength_f_cr2_race4_se'"
putexcel F10=`strength_f_cr2_obs'
putexcel G2=`strength_f_cr23_race0' G4=`strength_f_cr23_race1' G6=`strength_f_cr23_race3' G8=`strength_f_cr23_race4', nformat(0.000)
putexcel H2="`strength_f_cr3_race0_est'" H3="`strength_f_cr3_race0_se'" H4="`strength_f_cr3_race1_est'" H5="`strength_f_cr3_race1_se'"
putexcel H6="`strength_f_cr3_race3_est'" H7="`strength_f_cr3_race3_se'" H8="`strength_f_cr3_race4_est'" H9="`strength_f_cr3_race4_se'"
putexcel H10=`strength_f_cr3_obs'
putexcel close






*Test if the differences between NHPI and each racial/ethnic group between Hawaii and other census regions
lincom _b[exe_strength_advice_f_cr0:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:0.praceethnicgp_multi_sim], eform
local strength_f_cr02_race0=`r(p)'

lincom _b[exe_strength_advice_f_cr0:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:1.praceethnicgp_multi_sim], eform
local strength_f_cr02_race1=`r(p)'

lincom _b[exe_strength_advice_f_cr0:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:3.praceethnicgp_multi_sim], eform
local strength_f_cr02_race3=`r(p)'

lincom _b[exe_strength_advice_f_cr0:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:4.praceethnicgp_multi_sim], eform
local strength_f_cr02_race4=`r(p)'


lincom _b[exe_strength_advice_f_cr1:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:0.praceethnicgp_multi_sim], eform
local strength_f_cr12_race0=`r(p)'

lincom _b[exe_strength_advice_f_cr1:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:1.praceethnicgp_multi_sim], eform
local strength_f_cr12_race1=`r(p)'

lincom _b[exe_strength_advice_f_cr1:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:3.praceethnicgp_multi_sim], eform
local strength_f_cr12_race3=`r(p)'

lincom _b[exe_strength_advice_f_cr1:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:4.praceethnicgp_multi_sim], eform
local strength_f_cr12_race4=`r(p)'


lincom _b[exe_strength_advice_f_cr3:0.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:0.praceethnicgp_multi_sim], eform
local strength_f_cr32_race0=`r(p)'

lincom _b[exe_strength_advice_f_cr3:1.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:1.praceethnicgp_multi_sim], eform
local strength_f_cr32_race1=`r(p)'

lincom _b[exe_strength_advice_f_cr3:3.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:3.praceethnicgp_multi_sim], eform
local strength_f_cr32_race3=`r(p)'

lincom _b[exe_strength_advice_f_cr3:4.praceethnicgp_multi_sim]-_b[exe_strength_advice_f_cr2:4.praceethnicgp_multi_sim], eform
local strength_f_cr32_race4=`r(p)'


/*
matrix Output=(strength_f_cr0_race0, strength_f_cr02_race0, strength_f_cr1_race0, strength_f_cr12_race0, strength_f_cr2_race0, strength_f_cr3_race0, strength_f_cr32_race0 \ ///
strength_f_cr0_race1, strength_f_cr02_race1, strength_f_cr1_race1, strength_f_cr12_race1, strength_f_cr2_race1, strength_f_cr3_race1, strength_f_cr32_race1 \ ///
strength_f_cr0_race3, strength_f_cr02_race3, strength_f_cr1_race3, strength_f_cr12_race3, strength_f_cr2_race3, strength_f_cr3_race3, strength_f_cr32_race3 \ ///
strength_f_cr0_race4, strength_f_cr02_race4, strength_f_cr1_race4, strength_f_cr12_race4, strength_f_cr2_race4, strength_f_cr3_race4, strength_f_cr32_race4)
matrix list Output
*/
putexcel set "model/brfss2015-2019-pathanalysis-tableoutput/strength_region_vsHawaii_f", replace
putexcel A1=("") B1=("Estimates in Eastern US") C1=("Wald test with corresponding Hawaii estimates (p-value)") D1=("Estimates in West coast") E1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel F1=("Estimates in Hawaii") G1=("Estimates in Guam") H1=("Wald test with corresponding Hawaii estimates (p-value)")
putexcel A2=("nHwhite (single) Odds ratio") A3=("SE")
putexcel A4=("nHwhite (multirace) Odds ratio") A5=("SE")
putexcel A6=("NHPI (multirace) Odds ratio") A7=("SE")
putexcel A8=("other racial/ethnic groups Odds ratio") A9=("SE")
putexcel A10=("No. of observations")
putexcel B2="`strength_f_cr0_race0_est'" B3="`strength_f_cr0_race0_se'" B4="`strength_f_cr0_race1_est'" B5="`strength_f_cr0_race1_se'"
putexcel B6="`strength_f_cr0_race3_est'" B7="`strength_f_cr0_race3_se'" B8="`strength_f_cr0_race4_est'" B9="`strength_f_cr0_race4_se'"
putexcel B10=`strength_f_cr0_obs'
putexcel C2=`strength_f_cr02_race0' C4=`strength_f_cr02_race1' C6=`strength_f_cr02_race3' C8=`strength_f_cr02_race4', nformat(0.000)
putexcel D2="`strength_f_cr1_race0_est'" D3="`strength_f_cr1_race0_se'" D4="`strength_f_cr1_race1_est'" D5="`strength_f_cr1_race1_se'"
putexcel D6="`strength_f_cr1_race3_est'" D7="`strength_f_cr1_race3_se'" D8="`strength_f_cr1_race4_est'" D9="`strength_f_cr1_race4_se'"
putexcel D10=`strength_f_cr1_obs'
putexcel E2=`strength_f_cr12_race0' E4=`strength_f_cr12_race1' E6=`strength_f_cr12_race3' E8=`strength_f_cr12_race4', nformat(0.000)
putexcel F2="`strength_f_cr2_race0_est'" F3="`strength_f_cr2_race0_se'" F4="`strength_f_cr2_race1_est'" F5="`strength_f_cr2_race1_se'"
putexcel F6="`strength_f_cr2_race3_est'" F7="`strength_f_cr2_race3_se'" F8="`strength_f_cr2_race4_est'" F9="`strength_f_cr2_race4_se'"
putexcel F10=`strength_f_cr2_obs'
putexcel G2="`strength_f_cr3_race0_est'" G3="`strength_f_cr3_race0_se'" G4="`strength_f_cr3_race1_est'" G5="`strength_f_cr3_race1_se'"
putexcel G6="`strength_f_cr3_race3_est'" G7="`strength_f_cr3_race3_se'" G8="`strength_f_cr3_race4_est'" G9="`strength_f_cr3_race4_se'"
putexcel G10=`strength_f_cr3_obs'
putexcel H2=`strength_f_cr32_race0' H4=`strength_f_cr32_race1' H6=`strength_f_cr32_race3' H8=`strength_f_cr32_race4', nformat(0.000)
putexcel close












log close
exit

